D
Dave Sharpe
I need the following to use the the Value
assigned to the Variable not the Name of the
Variable ( ex "ItemCode" not ColName1 );
see "<--- here" below.
All assistance will be appreciated.
Thanks
Dave
Option Explicit
Sub test()
Dim ColName1 As String
ColName1 = "ItemCode"
Dim ColName2 As String
ColName2 = "Quantity"
Dim ColName3 As String
ColName3 = "PriceQuote"
Dim curSheetCol
Dim ColHead
curSheetCol = 1
For curSheetCol = 1 To 3
ColHead = "ColName" & curSheetCol
Debug.Print ColHead ' <---- here
Next curSheetCol
End Sub
assigned to the Variable not the Name of the
Variable ( ex "ItemCode" not ColName1 );
see "<--- here" below.
All assistance will be appreciated.
Thanks
Dave
Option Explicit
Sub test()
Dim ColName1 As String
ColName1 = "ItemCode"
Dim ColName2 As String
ColName2 = "Quantity"
Dim ColName3 As String
ColName3 = "PriceQuote"
Dim curSheetCol
Dim ColHead
curSheetCol = 1
For curSheetCol = 1 To 3
ColHead = "ColName" & curSheetCol
Debug.Print ColHead ' <---- here
Next curSheetCol
End Sub