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

Can I code a macro for a button to update from an SQL/ODBC source?

Status
Not open for further replies.

DPlank

IS-IT--Management
May 30, 2003
1,903
GB
I'm writing a report sheet up in excel. I want to include a button that my users can click on to refresh the data.

This data is stored in a separate workbook, which itself is populated by running an SQL/ODBC connection to an Oracle database.

Can I create a button in my users sheet that will run the update request into the source data sheet?

It would then need to refresh the data in the users sheet.

Is this possible? If so , how..?

Thanks in advance.
David
 
Have you tried setting the refresh on open property in the primary workbook?
 
Think I could have been clearer before. I have 3 entities involved. Oracle Database, Source workbook, Users workbook.

The Source workbook gets the data from the database.

This is summarised in the User workbook.

I need to implement a button that can activate the ODBC connection and update the information in the Source workbook from the database.

The button should then refresh the data in the User workbook.

I don't think refresh on open on the Source workbook would be able to do this --- the book should never be opened (all going well). And setting this on the User book will only update to the last saved data in the Source book.

Hope that makes things clearer. Thanks for the suggestion.
David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top