Dear all,
I have a problem with the Invoke Code activity.
Here’s my code:
Dim d As Integer
Dim m As Integer
Dim name As String
d = colNum
name = ""
Do While (d > 0)
m = (d - 1) Mod 26
name = Chr(65 + m) + name
d = Int((d - m) / 26)
Loop
colLetter = name
colNum and colLetter are arguments.
I get an error that the implicit conversion from double to integer is not allowed in line 9, which is the following line:
d = Int((d - m) / 26)
How am I supposed to change the code to make it work?
This is the easiest way to get a column letter (Excel) from an index.
e.g. 27 => AA, 5 => E, etc.
- T0Bi