Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello all, does anyone know how to make Hyperlinks "stick" so that when I import them from another workbook, the cell data is not only copied, but the hyperlinks are as well. The cell data (or text) copies just fine, but the hyperlinks are all blown away. The hyperlink cells that I am importing are all "linked" to files located on my network in different locations and in some cases on different drives. And every hyperlink is "linked" to its own unique file. I am using the following code to copy all the data (not just hyperlink cells) from one workbook to another. I thought there may be a method available in .Add or .QueryTables that I could use that would "preserve" the hyperlinks, but I could not find one. Thanks in advance for the help..... Filename = Application.InputBox(Prompt:="Enter the EXACT Path and File Name of the workbook" & Chr(13) & "you wish to import from: ", Type:=2) With ActiveSheet.QueryTables.Add(Connection:=Array( _ "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & Filename & ";M" _ , _ "ode=Share Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database P" _ , _ "assword="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk " _ , _ "Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OL" _ , _ "EDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _ ), Destination:=Range("A1")) .CommandType = xlCmdTable .CommandText = Array("WORKLOG$A1:AA10000") .Name = Filename .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = False .AdjustColumnWidth = False .RefreshPeriod = 0 .PreserveColumnInfo = True .SourceDataFile = "Filename" .Refresh BackgroundQuery:=False .MaintainConnection = False End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Annotations sticking to data point & data table | Charts and Charting in Excel | |||
Importing data seems to interfere with auto-scheduled macro | Excel Programming | |||
Formats and Data validations changes are not sticking | Excel Worksheet Functions | |||
Importing Data - overriding auto format | Excel Programming | |||
Auto Importing of text fiel data | Excel Programming |