I have a project that I am working on and I am new to
VB but has manage to accomplish quite a bit of experience.
I am using Excel 2000 and Access 2002. I have linked tables within access from excel. My main excel workbook contains different worksheets that holds the information that is linked to the tables within access.
My questions is how do I update these linked table within access when I open any saved workbook from excel. Below is my
VB for opening any excel spreadsheet for editing. When it opens I want the spreadsheet to automatically update the links within access.
Public Sub EditProjectNumber()
Dim xl As Object
Dim Wb As Object
Dim sht As Object
Set xl = Excel.Application
' If you want Excel to appear, use next line:
xl.Visible = True
xl.Dialogs(xlDialogOpen).Show "C:\Cost"
Set Wb = xl.ActiveWorkbook
Set sht = Wb.Sheets("PROJECT")
End Sub
This works perfectly for opening any excel spreadsheet.
Also is there a way to rename the workbook and link that workbook to access when it is opened.
The above
VB is in access.
Thank you.