'Excel VB Copy and Pasting Hyperlinks
I am having trouble copying and pasting the hyperlinks from one sheet to another using VB.
I am using a database connection to pull the hyperlinks into Sheet1 and then using a macro to copy and paste the database data into another sheet, however the copy and pasting doesnt paste the "Clickable" link, only plain text.
How do I go about copying a hyperlink using VB, is this even possible??
Sheets("Sheet1").Select
Range("J19:K100").Select
Application.CutCopyMode = False
**Selection.SpecialCells(xlCellTypeVisible).Copy**
Sheets("Sheet2").Select
Range("C5:D100").Select
ActiveSheet.Paste **Link:=True**
Any help is much appreciated! Thanks!
UPDATE
I am using a database connection, which holds the URL/Hyperlinks. I have tried your code for filtered table, however this only works if the links are directly input into the cell. i.e entered through right click on cell > Hyperlink.
Has anyone achieved copying URL's from a database connection in excel before?
Thanks.
Solution 1:[1]
You can use following paste special option to paste links.
ActiveSheet.PasteSpecial xlPasteAll
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dubison |
