A
AlDeb
I have the below code on an MS Access Form Command Button that save
Access Queries to and Excel File. Each Query Name becomes a separat
Sheet in Excel. My problem is the Excel File opens and the Sheet is no
maximized. I would like for the Excel Sheet to be maximized when th
file is opened. Can anyone help me with this. Is there some VBA code
can run when the Excel file opens that forces the sheet to b
maximized.
Thanks for your help.
Code
-------------------
Private Sub Command0_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Crossmember", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Crossmember"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Assembly", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Assembly"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Cylinder", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Cylinder"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Weld", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Weld"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Misc", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Misc"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Short_stroke", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Short_stroke"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Steeraxle", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Steeraxle"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Transaxle", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Transaxle"
Application.FollowHyperlink "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls"
End Su
Access Queries to and Excel File. Each Query Name becomes a separat
Sheet in Excel. My problem is the Excel File opens and the Sheet is no
maximized. I would like for the Excel Sheet to be maximized when th
file is opened. Can anyone help me with this. Is there some VBA code
can run when the Excel file opens that forces the sheet to b
maximized.
Thanks for your help.
Code
-------------------
Private Sub Command0_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Crossmember", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Crossmember"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Assembly", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Assembly"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Cylinder", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Cylinder"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Mast_Weld", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Mast_Weld"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Misc", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Misc"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Short_stroke", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Short_stroke"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Steeraxle", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Steeraxle"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Transaxle", "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls", True, "Transaxle"
Application.FollowHyperlink "C:\Documents and Settings\abajacks\Desktop\SULLIGENT\Sulligent.xls"
End Su