recreate hiperlink, or create net hyperlink VBA excel -
address I have 2 sheets sheet (sheet 1) is 1 hyperlink to me in a file \ sii \ Picture \ as.jpg The hyperlink name is "LINK". I need to recreate this hyperlink without "Format" (Background color and none of them). I need to use this VBA.
When I try, I get an error
localization = sheets ("Sheet1"). Range ("A1") Hyperlinks (1) .Address Sheets ("Sheet2"). Hyperlink Add anchor: = Sheets ("Sheet2"). Room (2, 2), Address: = localization, Teksttodiple = "link"
If I do something
Sheets ( " Sheet 1 "). Choose Range (Sales (1,1)) Select SELECTION.Copy Sheets ("Sheet 2") Select Sheet ("Sheet2"). Paste
I get good hyperlink but the hyperlink is made to the background and anything from the first sheet, and my screen blinking because Excel Sheet 1 and Sheet jumping between 2
This should work for you. You may have to fit within the amendments it is your current code
Sub Main () Dim rngDest as range dim rngSource as range dim wkshtSource Worksheet dim wkshtDest Worksheet dim urlSource as' set worksheet as a string and easy reference set wkshtSource = ActiveWorkbook.Sheets ( "Sheet1") set wkshtDest = ActiveWorkbook.Sheets ( "Sheet2") set rngSource = wkshtSource.Cells range of variables (for 1, 1) set rngDest = wkshtDest.Cells (2, 2) 'hyperlink address gets to be copied urlSour ce = rngSource.Hyperlinks (1) .Address' second page makes hyperlink rngDest.Hyperlinks.Add Anchor: = rngDest, address: = urlSource, TextToDisplay: = "link" end
Comments
Post a Comment