C
Christian
Hi NG,
I'm using this VBA below (I found it from another post) to export an query
to excel format.
I use Win2000, Excel 2000 and Access 2000.
Everything works out as expected, only problem is that all text fields in
Excel are getting a 'sign in front of the text.
Is there any possibility to avoid the ' sign?
- Chr
'Public Sub MoveQueryToExcel()
Dim MyXL As Object
Dim xlwk As Excel.Workbook
'this is to close the spreadsheet, if it is open
Set MyXL = CreateObject("Excel.application")
Set xlwk = GetObject("C:\Users\reset_graph.xls")
xlwk.Close
Set xlwk = Nothing
'this is to send the query over
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"QryReportPlain", _
"C:\users\reset_graph.xls"
'this is to open Excel and the spreadsheet again
MyXL.Visible = True
MyXL.Workbooks.Open "C:\Users\reset_graph.xls"
End Sub
I'm using this VBA below (I found it from another post) to export an query
to excel format.
I use Win2000, Excel 2000 and Access 2000.
Everything works out as expected, only problem is that all text fields in
Excel are getting a 'sign in front of the text.
Is there any possibility to avoid the ' sign?
- Chr
'Public Sub MoveQueryToExcel()
Dim MyXL As Object
Dim xlwk As Excel.Workbook
'this is to close the spreadsheet, if it is open
Set MyXL = CreateObject("Excel.application")
Set xlwk = GetObject("C:\Users\reset_graph.xls")
xlwk.Close
Set xlwk = Nothing
'this is to send the query over
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"QryReportPlain", _
"C:\users\reset_graph.xls"
'this is to open Excel and the spreadsheet again
MyXL.Visible = True
MyXL.Workbooks.Open "C:\Users\reset_graph.xls"
End Sub