vba to close specific file
My pathway for this file is:
C:\Documents and Settings\User1\My Documents\Rpt_Qry_Tbl_Data.pdf
Any help is welcome (or to at least know if this is even possible from access)
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Can anyone point me in the right direction on what control I might be able to use that will allow an Access form to recognize that a file is being dropped into it, 'take control' of thefile and kick off the appropriate VBA to save the file out to where I need it stored?
Secondly, once I have this down I'd like to know how to have a link to the file auto populated in a field of that same form.
There are only 2 things suprisingly that are not functioning 100%. What I would like to know is what is the first command that happens when I double click the application to launch it. One issue I have is a form is launched that I always have to close out before I can use the application properly.
I want to see if I can either remove that pesky form from lauching or moving it down later in the sequence so I don't have to close it everytime.
Also, I placed the application and supporting files in the "Trusted Location", but I am still asked to "enable" the file before I can launch it.
I have about 3% knowlege of VBA programming BTW
Dim wo As Word.Application
Dim path As String
Set wo = CreateObject("Word.Application")
'Text added to the document
Set wo = Nothing
**********End of Code******************
The code is successful in creating the document and when looking in the directory, the file is there but with ~owner's file. When attempting to open the file with VBA, the message states the file is locked by the user who created the file.
The Excel prompts a standard massage with 3 buttons: save, notsave and cancel. Everytime, I click the notsave button to close the text file.
Is there a way to write some codes to bypass this standard message? What I want is to close down the text file without any change
When I am done, I use the .quit or .close, but the excel file has a before close event that brings up a special msgbox.
How do I bypass the before close event. I dont want to save the file or anything, I just want to close excel without the before close event running
Specifically, one specific Access field should go directly to a specific
cell in Excel and get that value.
I'm thinking that I use some kind of VBA code to open my
Excel file and assign the cell contents to a variable
which I then use in Access. I think I can find the cell
in Excel using a named range.
I need the exact code, though.
While working with Access and VBA There are many VBA codes which we use very frequently for example:
Private Sub close_Click()
How to save this as Module and then call to a button