PDA

View Full Version : VBScript and MSExcel


Mada_Milty
11-29-05, 10:49
I am trying to write a script that will insert columns into an excel spreadsheet, between existing columns.

I am using the command:

o_excel.columns(v_count).insert

where o_excel is the application object and v_count is the column number I'd like to insert a column to the right of. I receive the error in the attached picture.

Now, does anyone know how I can resolve this error? Do I have to add blank columns to the end of the spreadsheet where I can shift my existing columns to?

As always, your help is greatly appreciated. Cheers!

Mada_Milty
11-30-05, 11:56
Silly me...this insert statement was in a loop that wasn't terminating. It added columns until the spreadsheet was full! Hence the error.

No worries all.