Visual Basic, Insert a column into Excel
I writing a VB program that inserts a column of cells into an existing Excel worksheet with a specified range (e.g. "A1:A20"). After the column is inserted, each cell up to row 20 is filled with a text string.
How can I insert a column of cells without specifying the range? In other words, I would like to fill each cell in the new column and stop when it reaches the last row of data in the other existing columns. Any help is appreciated!
...
'specify a range of cells and fill with text
Selection.Insert
Range("A1:A20").Value = "MY TEXT"
...