Difficulty with macro in excel 2007.

H

helphelp

I have a website from which I download data and run macros for sorting data.
When I recors a macro in excel 2007, the macro looks for a specific file name
instead of using the active worksheet. For eg:
Sheets("userexport-23").Select. Everytime I download the -23 changes, Please
tell me how I can change the code to make the macro run in any worksheet.
Thanks

Prashanth
 
R

Rick Rothstein \(MVP - VB\)

It sure would help if you posted the code you are talking about and also
tell us what the -23 changes to... otherwise, all we can do is take wild
guesses.

Rick
 
G

Gary Keramidas

wild guess here.

worksheets(1).select if it's always the first worksheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top