Thread
:
macro to run on a list of hyperlinks
View Single Post
#
2
Posted to microsoft.public.excel.programming
Gary L Brown
external usenet poster
Posts: 219
macro to run on a list of hyperlinks
'PUT CURSOR ON FIRST HYPERLINK AND RUN PROCEDURE
'CODE WILL RUN UNTIL IT COMES TO A CELL
' WITHOUT A HYPERLINK
Dim strCurrentWorkbook As String
On Error Resume Next
strCurrentWorkbook = ActiveWorkbook.Name
Do
If Len(ActiveCell.Value) < 0 Then
If ActiveCell.Hyperlinks.Count < 0 Then
ActiveCell.Hyperlinks(1).Follow NewWindow:=True
'--------------------------------------
'YOUR CODE FOR MAKING CHANGES GOES HERE
'--------------------------------------
ActiveWorkbook.Save
Else
Exit Do
End If
End If
Workbooks(strCurrentWorkbook).Activate
ActiveCell.Offset(1, 0).Select
Loop
ActiveWindow.WindowState = xlMaximized
hth,
--
Gary Brown
If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.
"Todd" wrote:
Hi,
I have a lot of small changes I make in a standardized form (an excel
spreadsheet). The forms are stored in multiple locations on the network but
I have a list in a worksheet that has hyperlinks to every form. I am trying
to find a way to speed the process up of making the changes. I put an
example of a small change below. Can I make a macro that would in a selected
range open hyperlinks from my list, make the change, save the doc and then
move down the list to the next hyperlink?
Thanks,
Todd
Sub changes()
' Keyboard Shortcut: Ctrl+q
'
Range("G15:G101").Select
Selection.NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_(*
""-""??_);_(@_)"
Range("I90").Select
Selection.ClearContents
Range("G89").Select
ActiveCell.FormulaR1C1 = "1"
ActiveWindow.LargeScroll Down:=-2
Range("A1").Select
ActiveWorkbook.Save
End Sub
Reply With Quote
Gary L Brown
View Public Profile
Find all posts by Gary L Brown