S
Song Su
I have following code to export from query to Excel and open Excel file
(Application.FollowHyperlink)
DoCmd.SetWarnings False
Dim stDocName As String
DoCmd.OpenQuery "qryUnionToTable"
stDocName = "MultipleSections"
DoCmd.TransferSpreadsheet acExport, , stDocName, (Environ("homepath") &
"\My Documents\MultipleSections.xls")
DoCmd.SetWarnings True
Application.FollowHyperlink (Environ("homepath") & "\My
Documents\MultipleSections.xls"), , True
After Excel opened, I want to format all cells to number with 1 decimal like
below. How to continue these 3 lines after Application.FollowHyperlink? What
do I need in between these 2 blocks?
Cells.Select
Selection.NumberFormat = "0.0"
Range("A1").Select
(Application.FollowHyperlink)
DoCmd.SetWarnings False
Dim stDocName As String
DoCmd.OpenQuery "qryUnionToTable"
stDocName = "MultipleSections"
DoCmd.TransferSpreadsheet acExport, , stDocName, (Environ("homepath") &
"\My Documents\MultipleSections.xls")
DoCmd.SetWarnings True
Application.FollowHyperlink (Environ("homepath") & "\My
Documents\MultipleSections.xls"), , True
After Excel opened, I want to format all cells to number with 1 decimal like
below. How to continue these 3 lines after Application.FollowHyperlink? What
do I need in between these 2 blocks?
Cells.Select
Selection.NumberFormat = "0.0"
Range("A1").Select