Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to update hyperlinks via VBA after I added a hyperlink base to
the excel file properties. I can't figure out why the following code breaks when I try to assign cellValue for the first time. ==================== Sub SetHyperlinks() Dim r, c, z As Integer Dim hyp As Hyperlink Dim cellValue As Variant Worksheets("LOG").Select c = Application.InputBox(prompt:="Enter the column that contains the hyperlinks to set:") r = Application.InputBox(prompt:="Enter the row to set to #1:") z = Application.InputBox("How many hyperlinks to create:") z = z + r Do While r <= z cellValue = ActiveSheet.Cells(r, c).Value ** Object-defined error here ** If IsNull(cellValue) Then cellValue = " " ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Cells(r, c), Address:="Num-" & r & ".pdf", TextToDisplay:=cellValue r = r + 1 Loop End Sub =============== Thanks for any help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Relative/Current Cell Reference in Hyperlinks | Excel Discussion (Misc queries) | |||
Cell Reference with Hyperlinks | Excel Programming | |||
autocreating hyperlinks in excel? ie 500 cells to 500 hyperlinks? | Excel Programming | |||
Formulas that reference cells that reference another cell | Excel Discussion (Misc queries) | |||
Reference names and hyperlinks to other files in other directories | Excel Programming |