R
RFJ
The following is a shortened version of another post and its a problem I'm
also trying to overcome.
I've followed the advice using vba code and the kill statement and it is now
sitting as a module - there were no reported errors in its creation.
However, as someone on the lower part of their vba learning curve I'm now
stuck in terms of how I use that code.
I see I can create a macro using RunCode - and in the Expression Builder I
can find, under functions, a reference to the VBA code.
However, if I run the macro I get the message 'The expression you entered as
a function name that Access can't find."
The "Action Failed" window of the macro shows ExcelUpdateMacro () as the
culprit.
The module is called Converted_ExcelUpdateMacro; the function within the
module is called ExcelUpdateMacro()
Can SKS help out.
TIA
Rob
----
Hi Tom,
Just delete (or rename) the old Excel file before creating a new one.
This is simple if you're using VBA code: just use the Kill statement
Dim strFileSpec As String
...
strFileSpec = "D:\Folder\File.xls"
Kill strFileSpec
....
<cut>
also trying to overcome.
I've followed the advice using vba code and the kill statement and it is now
sitting as a module - there were no reported errors in its creation.
However, as someone on the lower part of their vba learning curve I'm now
stuck in terms of how I use that code.
I see I can create a macro using RunCode - and in the Expression Builder I
can find, under functions, a reference to the VBA code.
However, if I run the macro I get the message 'The expression you entered as
a function name that Access can't find."
The "Action Failed" window of the macro shows ExcelUpdateMacro () as the
culprit.
The module is called Converted_ExcelUpdateMacro; the function within the
module is called ExcelUpdateMacro()
Can SKS help out.
TIA
Rob
----
Hi Tom,
Just delete (or rename) the old Excel file before creating a new one.
This is simple if you're using VBA code: just use the Kill statement
Dim strFileSpec As String
...
strFileSpec = "D:\Folder\File.xls"
Kill strFileSpec
....
<cut>
with a NEW workbook (not just a new worksheet) of the same name.I have an Access macro that exports data to Excel at the end of each month.
Since the workbook from the prior month is there, Access inserts the data as a new worksheet.
I would like to export the data and have it replace the entire workbook