VBScript and MSExcel

Discussion in 'Software' started by Mada_Milty, Nov 29, 2005.

  1. Mada_Milty

    Mada_Milty MajorGeek

    I am trying to write a script that will insert columns into an excel spreadsheet, between existing columns.

    I am using the command:

    Code:
    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!
     

    Attached Files:

  2. Mada_Milty

    Mada_Milty MajorGeek

    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.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds