Which Variable to use?

AndrewKent

Well-known Member
Joined
Jul 26, 2006
Messages
889
Hi there,

On my last few threads I have been asking questions about how to best declare variables. After reading through the excellent content on C Pearsons website I now have a better understanding of how to declare a variable.

What it doesn't give me however is a list of what variables to use in certain situations. For example...

Text would be As String
Number would be As Intiger
True would be As Boolean

...does anyone have a list of what variables to use and when?

Andy
 
Thanks, and another...

Code:
Config2 = vbYesNo + vbQuestion

MsgBox("You are about to print an application." & vbCrLf & vbCrLf & "Do you wish to continue?", Config2, "" & VersionName & "")
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Long. (I'm sure you asked about MsgBox before!)
 
Upvote 0
I did but I think it was about decalring was the message box as a whole was, not a component part?
 
Upvote 0
Oh, OK. (It's Long either way)
 
Upvote 0

Forum statistics

Threads
1,215,781
Messages
6,126,870
Members
449,345
Latest member
CharlieDP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top