Hi,
I have a spreadsheet and I need to add text to a cell.
The coordinates (row and column) that I want to use for the cell are defined by two Integer variables:
I've seen entries in the online help that seem to indicate the following might be possible. (I can't find help entries that seem to address my problem.)
But when run the macro, I get the following error:
I'm not sure how to define the range so I can set the text.
Can anyone help?
Thanks...
I have a spreadsheet and I need to add text to a cell.
The coordinates (row and column) that I want to use for the cell are defined by two Integer variables:
Code:
Dim vCol As Integer
Dim vRow As Integer
I've seen entries in the online help that seem to indicate the following might be possible. (I can't find help entries that seem to address my problem.)
Code:
Application.Workbooks(1).ActiveSheet.Range.Cells(vRow, vCol).Text = "my text"
But when run the macro, I get the following error:
Code:
Wrong number of arguments or invalid property assignment
I'm not sure how to define the range so I can set the text.
Can anyone help?
Thanks...