Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

best training excel intermediate - variables

Forum home » Delegate support and help forum » Microsoft Excel Training and help » best training excel intermediate - Variables

best training excel intermediate - Variables

ResolvedVersion Standard

Karen has attended:
Excel VBA Intro Intermediate course

Variables

How do you define a variable

RE: Variables

Karen

To define a variable you use the VBA word "Dim". For best practice you should also give it a Data Type. For example:

Dim MyVariable As String

The word Public can be used instead of Dim if the variable is being shared with other Modules or Forms.

Caarlos


Excel tip:

Hide data in Excel Worksheets

Let's say you have some data in cell 'C5' you would like to hide from the casual viewer.

Click cell 'C5' to select it.

Click the 'Format' menu, select 'Cells'. When the 'Format Cells' dialogue box opens, click the 'Numbers' tab (if necessary), then select 'Custom' from the 'Category' list.

Double-click the 'Type' entry box and type three semi-colons: ";;;"

Click 'OK' to close the dialogue box and accept the new formatting.

The data in cell 'C5' disappears. It's still there and will work in calculations, but it isn't visible.

If you need to check the data, just click the blank cell and the contents appear in the 'Formula bar'.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.