excel macro dim(17) - need explanation.

BRUCE FOOTE

New Member
Joined
Sep 21, 2006
Messages
7
I am running troubeshooting a macro in EXCEL 2007 .

The Dim statements appear as follows:
Dim jbnme(17) As String, cpup(17) As Integer,'.
I am familiar with the Dim variable declaration but what does the (17) represent?

thanks,

Bruce
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
It's an array declared to 17.

What that really means depends on what Option Base is used.
If there is no Option Base statement or there is Option Base 0 (zero) [most common]
Then the array holds from - 0 to 17 [total of 18 positions]

If there is an Option Base 1 statement
Then the array holds from - 1 to 17 [total of 17 positions]
 
Upvote 0
tweedle,

I suspected that it may be an array. Thanks for the heads up about the 'Option Base statement'. This will direct me in my study & save time.

Thanks again,

Bruce
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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