PC Review


Reply
Thread Tools Rate Thread

Difficulty with macro in excel 2007.

 
 
helphelp
Guest
Posts: n/a
 
      5th Jul 2008
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
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      5th Jul 2008
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


"helphelp" <(E-Mail Removed)> wrote in message
news:7E884D36-41EB-402A-800F-(E-Mail Removed)...
>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


 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      5th Jul 2008
wild guess here.

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


--


Gary


"helphelp" <(E-Mail Removed)> wrote in message
news:7E884D36-41EB-402A-800F-(E-Mail Removed)...
>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



 
Reply With Quote
 
helphelp
Guest
Posts: n/a
 
      5th Jul 2008
Brilliant Gary. Thanks it works

Prashanth

"Gary Keramidas" wrote:

> wild guess here.
>
> worksheets(1).select if it's always the first worksheet.
>
>
> --
>
>
> Gary
>
>
> "helphelp" <(E-Mail Removed)> wrote in message
> news:7E884D36-41EB-402A-800F-(E-Mail Removed)...
> >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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run macro from shape when runnig macro in Excel 2007 bren Microsoft Excel Discussion 4 5th Dec 2009 09:03 PM
Excel 2007 Macro Help (Excel 2003 not working in 2007) Pman Microsoft Excel Misc 4 29th May 2008 06:29 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort =?Utf-8?B?R2F2aW4=?= Microsoft Excel Worksheet Functions 0 17th May 2007 01:20 PM
Difficulty of creating a macro? TylerLange Microsoft Excel Programming 3 6th Jun 2006 11:02 AM
Macro difficulty in Word 97 Jack Microsoft Word Document Management 7 4th Apr 2005 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:29 AM.