View Single Post
 
Old 01-29-2012, 06:50 PM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Windows XP Office 2007
Competent Performer
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default

Dang. You are right about the Dim statement. I looked on the MSFT website:

http://msdn.microsoft.com/en-us/library/7ee5a7s1(v=vs.80).aspx

and found this paragraph.

Different Types. You can specify different data types for different variables by using a separate As clause for each variable you declare. Alternatively, you can declare several variables to be of the same type by using a common As clause. Each variable takes the data type specified in the first As clause encountered after its variablename part.

It sure seems to me to say that I can group them as I did. They even give this example:

Code:
Dim a, b, c As Single, x, y As Double, i As Integer
' a, b, and c are all Single; x and y are both Double
I guess it works in VB but not in VBA. Another cute little gotcha from MSFT.

I ran the diagnostics. It found no errors. I don't need those 2 lines, so I'll just delete them.

As for the borders, I would do as you suggest it I were writing this for general use. It's just for me and mainly for one project where I need the tables to look a certain way. I don't need every option.

Anyway, thanks for all your help.
Reply With Quote