J
Johanna Gronlund
Hello,
I am trying to combine two working functions:
1. Updates a spreadsheet
2. Opens the spreadsheet
I want to have combine these two so that the users only need to press one
button that automatically updates and then opens the database.
I have pasted the text from VB if that helps:
Option Compare Database
Sub OpenExcelReport()
DoCmd.TransferSpreadsheet acExport, , "Qry_Enhanced Services Payments",
"G:\folder\Database\2008\Payments 08.XLS"
Shell "excel.exe "G:\folder\Database\2008\Payments 08.XLS", vbNormalFocus
End Sub
Sub OpenESReport()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"Qry_Enhanced Services Payments", "G:\folder\Database\2008\Payments 08.XLS",
True
End Sub
Also, I am not quite sure what the 'shell' part of the function does. If
anyone can put it in simple terms that would also be highly appreciated.
Many thanks in advance,
JG
I am trying to combine two working functions:
1. Updates a spreadsheet
2. Opens the spreadsheet
I want to have combine these two so that the users only need to press one
button that automatically updates and then opens the database.
I have pasted the text from VB if that helps:
Option Compare Database
Sub OpenExcelReport()
DoCmd.TransferSpreadsheet acExport, , "Qry_Enhanced Services Payments",
"G:\folder\Database\2008\Payments 08.XLS"
Shell "excel.exe "G:\folder\Database\2008\Payments 08.XLS", vbNormalFocus
End Sub
Sub OpenESReport()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"Qry_Enhanced Services Payments", "G:\folder\Database\2008\Payments 08.XLS",
True
End Sub
Also, I am not quite sure what the 'shell' part of the function does. If
anyone can put it in simple terms that would also be highly appreciated.
Many thanks in advance,
JG