i have this code to delete rows in vba
Please Login or Register to view this content.
Is there a similar code to delete cols.......i tried this but seem to get an error
Please Login or Register to view this content.
i have this code to delete rows in vba
Please Login or Register to view this content.
Is there a similar code to delete cols.......i tried this but seem to get an error
Please Login or Register to view this content.
Last edited by welchs101; 06-08-2011 at 06:43 PM.
How about...
If you turn on the macro recorder it will give you the syntax.Please Login or Register to view this content.
HTH
Regards, Jeff
that works..........the reason i was trying to do it the other way (with #s instead of letters) is because i have a value which is equal to the number of cols to delete........so i was hoping i could use numbers.
thanks. if i cant find what i am looking for i am going to use your suggestion.
thanks.
A very good question I probably don't know the right answer for.
The only thing that strikes me right now is to run something like this, but not sure if I'm barking up the right tree.
Are these columns always going to be next to each other? With this code, if it was column 1 and 2 you want deleted then column 1 would delete first making the old column 2 now column 1 and the for next would run twice.
Please Login or Register to view this content.
If you want to use numbers you could use code like
Please Login or Register to view this content.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Hi Mike,
Thanks for the help...sure do appreciate it.
I tried the .Resize method and it didn't work for me, but I see why now.
Any reason why the .Resize works this way...
But not...Please Login or Register to view this content.
Please Login or Register to view this content.
No, I don't know why the compiler interprets the omitted argument differently than a 0.
(The Worksheet function INDEX does interpret no argument as 0)
Okay got it...thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks