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

OPEN A DOCUMENT IN EXCEL FROM A BUTTON IN ACCESS

Status
Not open for further replies.

NewComer

Technical User
Joined
Apr 26, 2001
Messages
35
Location
US
MANY OF THE CHARTS I CREATE, I CREATE IN EXCEL USING AN ODBC LINK. WHAT I WOULD LIKE TO DO IS PLACE A BUTTON ON A FORM THAT WILL OPEN TO A SPECIFIC CHART IN EXCEL. IF SOMEONE COULD HELP ME WITH THIS I WOULD CERTAINLY APPRECIATE IT. THANKS IN ADVANCE.
 
Hi!

You can use the following code to open a specific workbook:

Dim ExcelBook As Excel.Workbook
Dim ExcelSheet As Excel.Worksheet

Set ExcelBook = Excel.Workbooks.Open(YourPathToTheWorkBook)
ExcelBook.Application.Visible = True
Set ExcelSheet = ExcelBook.Worksheets("YourSheetName")
ExcelSheet.Activate

This will open the workbook, make it visible and a make the chart sheet the active sheet.

hth
Jeff Bridgham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top