J
Johanna Gronlund
Hello,
I have two subs that I want to combine into one. This is so that I can run
them with one click of a button from the switchborad. Ideally, I would want
to do this by using code rather than macros. Can anyone help? I have pasted
the two codes below:
Sub OpenExcelReport()
DoCmd.TransferSpreadsheet acExport, , "Qry_Enhanced Services Payments",
"G:\Information Analysis - shared\Databases\Enhanced
Services\2008-09\Enhanced Services Payments 0809.XLS"
Shell "excel.exe ""G:\Information Analysis - shared\Databases\Enhanced
Services\2008-09\Enhanced Services Payments 0809.XLS""", vbNormalFocus
End Sub
Sub OpenESReport()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"Qry_Enhanced Services Payments", "G:\Information Analysis -
shared\Databases\Enhanced Services\2008-09\Enhanced Services Payments
0809.XLS", True
End Sub
Thanks very much,
Johanna
I have two subs that I want to combine into one. This is so that I can run
them with one click of a button from the switchborad. Ideally, I would want
to do this by using code rather than macros. Can anyone help? I have pasted
the two codes below:
Sub OpenExcelReport()
DoCmd.TransferSpreadsheet acExport, , "Qry_Enhanced Services Payments",
"G:\Information Analysis - shared\Databases\Enhanced
Services\2008-09\Enhanced Services Payments 0809.XLS"
Shell "excel.exe ""G:\Information Analysis - shared\Databases\Enhanced
Services\2008-09\Enhanced Services Payments 0809.XLS""", vbNormalFocus
End Sub
Sub OpenESReport()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97,
"Qry_Enhanced Services Payments", "G:\Information Analysis -
shared\Databases\Enhanced Services\2008-09\Enhanced Services Payments
0809.XLS", True
End Sub
Thanks very much,
Johanna