Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Difficulty with macro in excel 2007.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Difficulty with macro in excel 2007.

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" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Difficulty with macro in excel 2007.

wild guess here.

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


--


Gary


"helphelp" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Difficulty with macro in excel 2007.

Brilliant Gary. Thanks it works :)

Prashanth

"Gary Keramidas" wrote:

wild guess here.

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


--


Gary


"helphelp" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
In 2007 I am having difficulty distinguishing highlighted areas Bear Black Excel Discussion (Misc queries) 2 November 20th 08 09:31 AM
2007 Compatibility Mode Difficulty Lois B Excel Discussion (Misc queries) 0 April 21st 08 06:38 PM
Experiencing Difficulty with Excel cobbdj Excel Worksheet Functions 0 March 29th 07 02:28 AM
Difficulty of creating a macro? TylerLange Excel Programming 3 June 6th 06 11:02 AM
Opening Excel Application difficulty Ariston Excel Discussion (Misc queries) 1 February 20th 05 01:16 AM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"