Hello all,
I have to open a readonly Excel sheet from clicking on a button on an access
form. So far no problem:
Dim ObjXL As Excel.Application
Dim ObjXLBook As Excel.Workbook
Dim ObjXLSheet As Excel.Worksheet
Set ObjXL = CreateObject("Excel.Application")
Set ObjXLBook = ObjXL.Workbooks.Open("Mypath\Myfile.xls", , True)
Set ObjXLSheet = ObjXLBook.Worksheets("Main")
ObjXL.Visible = True
Then the user puts in the data. However, I want to prevent him from giving
it the wrong name and save it in the wrong place.
So I want to hide the close button on the sheet and insert a custom button
which gives the file the right name and saves it at the right place (path).
So my questions are ... How do I hide the close button when opening the file
(if at all possible) and what is the correct code to put on the onclick
event of the custom button to give it the right name and right place ?
Any help very much appreciated.
Ronny