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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynalic Hyperlink Command Button

Status
Not open for further replies.

Drenda

Programmer
Sep 1, 2007
85
GB
Can anyone help

Is it possible to create a command button that opens an excel file but with the hyperlink changing and being dependent on values of other control box values
I know how to set up the other control box values but not sure how to change the hyperlink, otherwise I hve to create a number of command buttons and make them visible / invisible, enabled, disabled depending on the control values which seems a long way round to achieve this

many thanks

 
This is great!!!!!!

Only problem now is when I open the excel file it doesn't refresh the data from my access database as it seems to be overuled. Do you have any ideas

 
tell me a brief info of what you are doing with excel

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
Okay

I have a data link from my excell spreadsheet which links into my access table and is set to refersh on open via Data Properties
I was originally opening the excel doc from a command button with a fixed hyperlink and can now open different version of the same excel doc that are linked to different tables in my DB which is what I wanted and thanks to your advice I have now pasted the code into my VB and it works fine

Problem is now when I open any of the excel docs they do not refresh on open

Thanks
 
You may need a refresh in your excel workbook. Macros need to be enabled.
Tools > Macro > Security

Paste the code below in the code window of excel workbook.
Code:
Private Sub Workbook_Open()
    Me.RefreshAll
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
This works really well....

Many thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top