Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Hyperlinks not sticking when auto importing data from another work


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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Annotations sticking to data point & data table AndreaB Charts and Charting in Excel 4 January 28th 08 02:52 PM
Importing data seems to interfere with auto-scheduled macro Priyanka[_2_] Excel Programming 1 January 24th 08 08:37 AM
Formats and Data validations changes are not sticking Vinod[_2_] Excel Worksheet Functions 1 November 6th 07 09:12 PM
Importing Data - overriding auto format Max Scott[_2_] Excel Programming 1 January 14th 04 11:56 AM
Auto Importing of text fiel data Mike Nettleingham Excel Programming 0 September 16th 03 12:19 AM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"