Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to advance current row by 1

activeCell.Offset(1,0).Select

--
Regards,
Tom Ogilvy

"Dan" wrote in message
...
I would like to create a macro that can be attached to a button on Sheet2

that when clicked will cause the Active row in Sheet 1 to advance by 1.

Thanks in advance - Dan



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Macro to advance current row by 1

Hi Tom
I think the OP wanted to change the active cell on a different sheet
than the current active sheet - whatever reason he has for this :-)

--
Regards
Frank Kabel
Frankfurt, Germany


Tom Ogilvy wrote:
activeCell.Offset(1,0).Select


"Dan" wrote in message
...
I would like to create a macro that can be attached to a button on
Sheet2

that when clicked will cause the Active row in Sheet 1 to advance by
1.

Thanks in advance - Dan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to advance current row by 1

I believe you are correct Frank, thanks for the heads up

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Worksheets("Sheet1").Activate
ActiveCell.Offset(1, 0).Select
Worksheets("Sheet2").Activate
Application.ScreenUpdating = True

End Sub

--
Regards,
Tom Ogilvy


"Frank Kabel" wrote in message
...
Hi Tom
I think the OP wanted to change the active cell on a different sheet
than the current active sheet - whatever reason he has for this :-)

--
Regards
Frank Kabel
Frankfurt, Germany


Tom Ogilvy wrote:
activeCell.Offset(1,0).Select


"Dan" wrote in message
...
I would like to create a macro that can be attached to a button on
Sheet2

that when clicked will cause the Active row in Sheet 1 to advance by
1.

Thanks in advance - Dan




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
Macro for HEAT chart - THANKS IN ADVANCE! Rachel Costanza Excel Worksheet Functions 15 September 17th 09 11:05 PM
advance filter sustitution in a macro - shared workbook Belinda7237 Excel Worksheet Functions 0 June 11th 08 01:52 AM
use current year in macro mohavv Excel Discussion (Misc queries) 1 January 8th 08 09:44 PM
macro for current time mangesh Excel Discussion (Misc queries) 0 March 21st 06 08:22 PM
Use current sheet name in Macro Bernie Deitrick Excel Programming 0 January 21st 04 04:48 PM


All times are GMT +1. The time now is 11:59 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"