JRinderer
New Member
- Joined
- Dec 1, 2015
- Messages
- 17
Hello all, I've got a bit of code in Excel I've used to automate opening a website and clicking various objects. I've worked a lot in Excel VBA, but Access VBA is still new, so I've got some of this completed; but I'm having trouble with the last half.
Goals:
Goals:
- On opening the Access file I want the program to go to a SharePoint site and check to see that the users file name matches mine.
- I have the code to go to the SharePoint site and get the name of the file on SharePoint and then store it into a variable.
- I need code to grab the file name of the users application (the Access file).
- I know how, in Excel, to write code that will run when the user opens the file
Code:
Workbook_Open()
- If the users file name doesn't match mine I want a message box to appear telling the user to download the most recent file. I then want to close the application down
- I have code for the message box.
- I am still unsure how to reference the Access application itself to close it. Application.close? Can I set an Access object like I can in Excel?
Code:
[INDENT=2]
Dim wB as workbookSet[/INDENT]
[INDENT=2]Set Wb = Thisworkbook
Wb.close[/INDENT]