Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been trying to get some code working - the intent is to have the
program read through the column headers of a table and create a Worksheet name to store the associated column name with the column number. This part of the code works. But when I try to use the Worksheet name in the VBA code, I keep getting a type mismatch. 'this assigns the Worksheet name of column 1 (happens to be "Serial") to the integer value of 1: Worksheets("Sheet1").Names.Add Name:=Worksheets("Sheet1").Cells(1, 1).Value, RefersTo:=1 'this trys to access the column number to use in a calculation: tempVal = Worksheets("Sheet1").Names("Serial").Value tempVal is shown in the Locals as a variant/string and is equal to "=1", which cannot be used in calculations. Is there a way to get tempVal to be an integer which I can use in calculations? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I add an integer to an existing integer? | Excel Worksheet Functions | |||
How to type in customers' names & addresses to print mail labels? | Excel Discussion (Misc queries) | |||
random integer problem. | Excel Programming | |||
Problem with Solver and Integer constraints | Excel Worksheet Functions | |||
linerar/integer programming problem | Excel Programming |