Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How to get a macro to repeat

Hi

Does anyone know how i can get the following simple macro to repeat, but
following the hyperlink in the next cell down (which will be A3) and then
pasting the result 10 rows down (A13), and to continue the process (A4 and
A23, then A5 and A33..etc etc) until it reaches an empty cell and stops?

If anyone can help i'd be very grateful, thanks,
\sh

(i'm using Excel 2002 SP3)

----------------------------------------------------

Sub Test()
' Test Macro

' Macro recorded 02/11/2006 by \sh

' Keyboard Shortcut: Ctrl+p

Range("A2").Select

Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

Sheets("Sheet2").Select

ActiveSheet.Paste

Sheets("Sheet1").Select

Range("A3").Select

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 430
Default How to get a macro to repeat

Not sure of what you are trying to do here, but:
Here's an example of Looping thru the values beginning in
Range A2 of Sheet1 and continuing down until you reach a blank cell.

In a Standard Module paste in:

Sub tester()
Sheets("Sheet1").Range("A2").Select
Do Until ActiveCell = ""
Selection.Hyperlinks(1).Follow
Sheets("Sheet1").Activate
ActiveCell.Offset(1, 0).Select
Loop
End Sub

Come back with questions,,,



"\sh" wrote in message
:

Hi

Does anyone know how i can get the following simple macro to repeat, but
following the hyperlink in the next cell down (which will be A3) and then
pasting the result 10 rows down (A13), and to continue the process (A4 and
A23, then A5 and A33..etc etc) until it reaches an empty cell and stops?

If anyone can help i'd be very grateful, thanks,
\sh

(i'm using Excel 2002 SP3)

----------------------------------------------------

Sub Test()
' Test Macro

' Macro recorded 02/11/2006 by \sh

' Keyboard Shortcut: Ctrl+p

Range("A2").Select

Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

Sheets("Sheet2").Select

ActiveSheet.Paste

Sheets("Sheet1").Select

Range("A3").Select

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How to get a macro to repeat

Thanks, Jim

But i got it sorted with the help of the fellas over at MrExcel.com in the
end.

FYI:

http://www.mrexcel.com/board2/viewto...157961#1157961

Cheers!
\sh


"Jim May" wrote in message
...
Not sure of what you are trying to do here, but:
Here's an example of Looping thru the values beginning in
Range A2 of Sheet1 and continuing down until you reach a blank cell.

In a Standard Module paste in:

Sub tester()
Sheets("Sheet1").Range("A2").Select
Do Until ActiveCell = ""
Selection.Hyperlinks(1).Follow
Sheets("Sheet1").Activate
ActiveCell.Offset(1, 0).Select
Loop
End Sub

Come back with questions,,,



"\sh" wrote in message
:

Hi

Does anyone know how i can get the following simple macro to repeat, but
following the hyperlink in the next cell down (which will be A3) and then
pasting the result 10 rows down (A13), and to continue the process (A4
and
A23, then A5 and A33..etc etc) until it reaches an empty cell and stops?

If anyone can help i'd be very grateful, thanks,
\sh

(i'm using Excel 2002 SP3)

----------------------------------------------------

Sub Test()
' Test Macro

' Macro recorded 02/11/2006 by \sh

' Keyboard Shortcut: Ctrl+p

Range("A2").Select

Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

Sheets("Sheet2").Select

ActiveSheet.Paste

Sheets("Sheet1").Select

Range("A3").Select

End Sub




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
repeat macro until empty space in next column Sabba Efie Excel Worksheet Functions 1 August 15th 06 09:08 PM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Repeat a command in a Macro Phil Osman Excel Discussion (Misc queries) 4 June 30th 05 01:23 AM
repeat macro formula to all cells dave glynn Excel Discussion (Misc queries) 8 March 10th 05 08:42 PM


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

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"