Dear all,
I am new to excel. I am stuck with this code, do not know why it is not working.any clue will be very helpful, thanks
Please Login or Register to view this content.
Dear all,
I am new to excel. I am stuck with this code, do not know why it is not working.any clue will be very helpful, thanks
Please Login or Register to view this content.
Last edited by shaukat; 11-22-2011 at 05:37 PM.
shaukat,
First off, I'd recommend never using a keyword, like copy, as the name of a macro or function. Use something like CopyPaste or ImportData.
Second, the way you're declaring the range to copy is using the Cells without a sheet declaration, so they're defaulting to the active sheet. I know you have the sheet declaration outside the range, but within the range you don't have it so that is messing it up. Since you're already getting i and j, just use those directly instead:
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
wonderful thanks, but wondering why that logic did not work.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks