C
chris23892 via AccessMonster.com
hello all. been awhile since I've been here.
I have the following VB code behind a command button in acess:
Dim sXL As String, oXL As Object
sXL = "some path with a file name .XLS" 'Full path to your spreadsheet
' Insert the actual name of your query between the quotes below
DoCmd.TransferSpreadsheet acExport, , "Qery name", sXL
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
oXL.WorkBooks.Open FileName:=sXL
works GREAT in acess, I use this snippet all the time.
My question is how do I get this snippet to work in MS Excel? There can't be
that much differnce (or yes there could be, I guess).
I can't imagine it would be that hard to tell MS Excell to do the above code
snippet.
this would be a very handy trick in my toolbox to be able to create a sheet
with code behind command buttons to run all the Acess queries I have.
Any suggestions??
Thanks, looking forward to figuring this one out.
I have the following VB code behind a command button in acess:
Dim sXL As String, oXL As Object
sXL = "some path with a file name .XLS" 'Full path to your spreadsheet
' Insert the actual name of your query between the quotes below
DoCmd.TransferSpreadsheet acExport, , "Qery name", sXL
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
oXL.WorkBooks.Open FileName:=sXL
works GREAT in acess, I use this snippet all the time.
My question is how do I get this snippet to work in MS Excel? There can't be
that much differnce (or yes there could be, I guess).
I can't imagine it would be that hard to tell MS Excell to do the above code
snippet.
this would be a very handy trick in my toolbox to be able to create a sheet
with code behind command buttons to run all the Acess queries I have.
Any suggestions??
Thanks, looking forward to figuring this one out.