MikeFromCedar
New Member
- Joined
- Jun 12, 2020
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
I have been trying to use a Call with a variable to access other functions in Excel vba. I can access the cell contents but cannot assign it. The compiler states an error "Expected: identifier". Any ideas or thoughts?
Do While j < numberOfSections + 1
functionCall = ThisWorkbook.Worksheets("IMAGES&SUPPORT").Range("F" & j).Value
.TypeText (functionCall) 'THIS TYPES THE TEXT I EXPECT
Call (functionCall) 'THIS LINE CAUSES THE ERROR
j = j + 1
Loop
End With
Do While j < numberOfSections + 1
functionCall = ThisWorkbook.Worksheets("IMAGES&SUPPORT").Range("F" & j).Value
.TypeText (functionCall) 'THIS TYPES THE TEXT I EXPECT
Call (functionCall) 'THIS LINE CAUSES THE ERROR
j = j + 1
Loop
End With