XLDelCol

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
only1platinum
Newbie
Posts: 15
Joined: Thu Aug 30, 2012 2:42 pm
Location: United States
Contact:

XLDelCol

Post by only1platinum » Wed Sep 12, 2012 4:22 pm

I am trying to use the below script to delete a bunch of un-needed columns from an excel file. Wondered if anyone could help me find what is wrong in this code. Right now it just sits the and loops. It should stop deleteing columns at row 66 starting at 26. I have tried the until command with and without quotes. I must be doing this wrong some how.

Let>c=26
XLGetCell>xlBook,%filename_without_extension%,1,66,delColCheck

Repeat>delColCheck
XLDelCol>xlBook,%filename_without_extension%,c
Let>c=c+1
Until>delColCheck=""


PS. Filename_without_extension is defiened earlier in the script and I know it works in the rest of the script properly.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Sep 12, 2012 8:35 pm

There is nothing inside your Repeat/Until loop that sets delColCheck, so it will never become "". So the loop will never end.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts