Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default macro- move down to empty cell & active worksheet

Hello, I have recorded a macro and I need to know what command to give it to
advance the active cell down the spreadsheet to the first empty cell. Also,
how do I tell the macro to look at the active worksheet or file to run, not a
specific one. I want to run this macro on a lot of files. Right now the
macro has one specific file name and I need to be able to run the macro on
any file.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 623
Default macro- move down to empty cell & active worksheet

Try:

Activecell.end(xldown).offset(1,0).select

--
Regards,
Fred


"EducatingMom" wrote in message
...
Hello, I have recorded a macro and I need to know what command to give it to
advance the active cell down the spreadsheet to the first empty cell. Also,
how do I tell the macro to look at the active worksheet or file to run, not a
specific one. I want to run this macro on a lot of files. Right now the
macro has one specific file name and I need to be able to run the macro on
any file.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default macro- move down to empty cell & active worksheet

Thanks, Fred. Any clue on how to replace a specific file name with a generic
one, like Active Worksheet? Here is the line from my macro that I need
changed, Windows("4 Way St.-Pretzel Park.xls").Activate

I want this macro to run on any file that I have open and active.




"Fred Smith" wrote:

Try:

Activecell.end(xldown).offset(1,0).select

--
Regards,
Fred


"EducatingMom" wrote in message
...
Hello, I have recorded a macro and I need to know what command to give it to
advance the active cell down the spreadsheet to the first empty cell. Also,
how do I tell the macro to look at the active worksheet or file to run, not a
specific one. I want to run this macro on a lot of files. Right now the
macro has one specific file name and I need to be able to run the macro on
any file.

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 623
Default macro- move down to empty cell & active worksheet

It's as you would expect:

Activesheet or
Activewindow

--
Regards,
Fred


"EducatingMom" wrote in message
...
Thanks, Fred. Any clue on how to replace a specific file name with a generic
one, like Active Worksheet? Here is the line from my macro that I need
changed, Windows("4 Way St.-Pretzel Park.xls").Activate

I want this macro to run on any file that I have open and active.




"Fred Smith" wrote:

Try:

Activecell.end(xldown).offset(1,0).select

--
Regards,
Fred


"EducatingMom" wrote in message
...
Hello, I have recorded a macro and I need to know what command to give it
to
advance the active cell down the spreadsheet to the first empty cell.
Also,
how do I tell the macro to look at the active worksheet or file to run, not
a
specific one. I want to run this macro on a lot of files. Right now the
macro has one specific file name and I need to be able to run the macro on
any file.

Thanks.






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
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Row Expansion Susan Excel Worksheet Functions 11 February 28th 06 07:15 PM
Adding a row to worksheet does not update cell references in another. blausen Excel Worksheet Functions 5 February 25th 06 09:14 PM
Update Macro: Leave Colour As Before Once Cell is Not Active JB2010 Excel Discussion (Misc queries) 2 February 2nd 06 06:08 PM


All times are GMT +1. The time now is 05:12 PM.

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

About Us

"It's about Microsoft Excel"