Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Hyperlink from Access to Ecxel

Status
Not open for further replies.

duncansancho

Technical User
Oct 9, 2003
45
0
0
GB
This is not strictly necessarily a VBA problem, but how can I import data by query to Ecxel and keep the hyperlinks?
Duncan
 
Create a live link to the table or query from within excel,

From excel click Data>Get External Data>New Database Query>....the choose msaccess databases* from the list...follow the wizard from there to select your mdb, table or query...You can opt to use the wizard or MsQuery (a gui type interface, similar to access)at this point...
after your comfy with this...I would recommend the MsQuery option, look for a check box).


then return your data to excel.


when data is returned,...you can right click in the data area and select properties to refresh on open...auto fill formulas etc.

In the returned data's sheet, add a new column with this formula for each hyperlink field...(in this case I assume col. A has hyperlink text in it)

=HYPERLINK(RIGHT(A2,LEN(A2)-SEARCH("#",A2,1)),LEFT(A2,SEARCH("#",A2,1)-1))

fill down...(this is where the autofill formulas option comes in handy)

this is now a live link, any time the workbook is opened. your current / up to date access data comes in (if you set the refresh on open option).


 
duncansancho,
Import data into column 'A' and insert blank column for 'B' and insert the following =HYPERLINK(A1) into B1 and drag down.
tav1035
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top