Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Excel Hyperlinks not retained when importing from workbook.


Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The workbook
from which I am copying the data is never opened. However, that workbook has
hyperlinks that need to be copied along with the cell data. The cell data
copies just fine, but the hyperlinks are no longer available. I need a few
lines of code that I can put into the macro that will not just copy the
cell's data values, but also their hyperlinks. Thanks in advance for your
help....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Excel Hyperlinks not retained when importing from workbook.

How are we to know what lines of code are required if we don't know how
you're importing your data ?

Posting existing code always helps.

Tim

"statum" wrote in message
...
Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The
workbook
from which I am copying the data is never opened. However, that workbook
has
hyperlinks that need to be copied along with the cell data. The cell data
copies just fine, but the hyperlinks are no longer available. I need a few
lines of code that I can put into the macro that will not just copy the
cell's data values, but also their hyperlinks. Thanks in advance for your
help....



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Excel Hyperlinks not retained when importing from workbook.

I am using the standard importing proceedure for importing excel data from
one workbook to another. As I stated in my original post, all the data
imports with no problem. Even the cell data that were assigned a hyperlink
copies without issue. Only the actual hyperlinks are not copied over.

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

"Tim Williams" wrote:

How are we to know what lines of code are required if we don't know how
you're importing your data ?

Posting existing code always helps.

Tim

"statum" wrote in message
...
Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The
workbook
from which I am copying the data is never opened. However, that workbook
has
hyperlinks that need to be copied along with the cell data. The cell data
copies just fine, but the hyperlinks are no longer available. I need a few
lines of code that I can put into the macro that will not just copy the
cell's data values, but also their hyperlinks. Thanks in advance for your
help....




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Excel Hyperlinks not retained when importing from workbook.

I would guess that method does not support hyperlinks. You would need to
either change your import method, or start storing the hyperlink addresses
in a separate column and use that data to recreate them in the workbook
which does the importing.

Tim

"statum" wrote in message
...
I am using the standard importing proceedure for importing excel data from
one workbook to another. As I stated in my original post, all the data
imports with no problem. Even the cell data that were assigned a hyperlink
copies without issue. Only the actual hyperlinks are not copied over.

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

"Tim Williams" wrote:

How are we to know what lines of code are required if we don't know how
you're importing your data ?

Posting existing code always helps.

Tim

"statum" wrote in message
...
Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The
workbook
from which I am copying the data is never opened. However, that
workbook
has
hyperlinks that need to be copied along with the cell data. The cell
data
copies just fine, but the hyperlinks are no longer available. I need a
few
lines of code that I can put into the macro that will not just copy the
cell's data values, but also their hyperlinks. Thanks in advance for
your
help....






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Excel Hyperlinks not retained when importing from workbook.

What method would you suggest? I've never used another method.

"Tim Williams" wrote:

I would guess that method does not support hyperlinks. You would need to
either change your import method, or start storing the hyperlink addresses
in a separate column and use that data to recreate them in the workbook
which does the importing.

Tim

"statum" wrote in message
...
I am using the standard importing proceedure for importing excel data from
one workbook to another. As I stated in my original post, all the data
imports with no problem. Even the cell data that were assigned a hyperlink
copies without issue. Only the actual hyperlinks are not copied over.

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

"Tim Williams" wrote:

How are we to know what lines of code are required if we don't know how
you're importing your data ?

Posting existing code always helps.

Tim

"statum" wrote in message
...
Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The
workbook
from which I am copying the data is never opened. However, that
workbook
has
hyperlinks that need to be copied along with the cell data. The cell
data
copies just fine, but the hyperlinks are no longer available. I need a
few
lines of code that I can put into the macro that will not just copy the
cell's data values, but also their hyperlinks. Thanks in advance for
your
help....









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Excel Hyperlinks not retained when importing from workbook.

Why not just open the file and copy the data ?

Tim

"statum" wrote in message
...
What method would you suggest? I've never used another method.

"Tim Williams" wrote:

I would guess that method does not support hyperlinks. You would need to
either change your import method, or start storing the hyperlink
addresses
in a separate column and use that data to recreate them in the workbook
which does the importing.

Tim

"statum" wrote in message
...
I am using the standard importing proceedure for importing excel data
from
one workbook to another. As I stated in my original post, all the data
imports with no problem. Even the cell data that were assigned a
hyperlink
copies without issue. Only the actual hyperlinks are not copied over.

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

"Tim Williams" wrote:

How are we to know what lines of code are required if we don't know
how
you're importing your data ?

Posting existing code always helps.

Tim

"statum" wrote in message
...
Hello all, I have a macro that will import data from a sheet in a
workbook to a sheet on the workbook I am currently working with. The
workbook
from which I am copying the data is never opened. However, that
workbook
has
hyperlinks that need to be copied along with the cell data. The cell
data
copies just fine, but the hyperlinks are no longer available. I need
a
few
lines of code that I can put into the macro that will not just copy
the
cell's data values, but also their hyperlinks. Thanks in advance for
your
help....









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
Excel Hyperlinks not retained when copied to new Workbook statum Excel Programming 0 June 24th 09 04:49 PM
Help with importing pictures from hyperlinks forxigan Excel Discussion (Misc queries) 14 February 19th 08 04:14 PM
Importing Web Page with Hyperlinks into Excel feltra Excel Discussion (Misc queries) 10 August 8th 07 01:17 AM
Importing Web Page with Hyperlinks into Excel feltra Excel Programming 10 August 8th 07 01:17 AM
Importing e-mail addresses not showing as hyperlinks gls858 New Users to Excel 4 April 18th 07 08:49 PM


All times are GMT +1. The time now is 12:25 PM.

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

About Us

"It's about Microsoft Excel"