R
Rich
Hello,
I transfer data to an Excel file from Ms Access using
TransferSpreadsheet. If I try to transfer data to the
same Excel file again using TransferSpreadsheet, I get the
error message that the sheet already exists. I tried
renaming the sheet, but I still get the same error
message. Like say I transfer tblData, I get a sheet in
Excel called tblData. So I rename that sheet to
shtSomething (and there are no other sheets, or I have
also tried having another sheet - say Sheet1). Even
though I renamed tblData to shtSomething, I still get the
error message that tblData still exists. The only
workaround I have found so far is to copy the data from
tblData sheet to another sheet and delete the tblData
sheet. It appears that Excel is remembering the tblData
sheet at a lower level of coding than VBA. Is there a way
to rename the sheet at that level (API code maybe?) or do
I have to stick with copying the data to another sheet and
deleting the TransferSpreadsheet sheet?
Thanks,
Rich
I transfer data to an Excel file from Ms Access using
TransferSpreadsheet. If I try to transfer data to the
same Excel file again using TransferSpreadsheet, I get the
error message that the sheet already exists. I tried
renaming the sheet, but I still get the same error
message. Like say I transfer tblData, I get a sheet in
Excel called tblData. So I rename that sheet to
shtSomething (and there are no other sheets, or I have
also tried having another sheet - say Sheet1). Even
though I renamed tblData to shtSomething, I still get the
error message that tblData still exists. The only
workaround I have found so far is to copy the data from
tblData sheet to another sheet and delete the tblData
sheet. It appears that Excel is remembering the tblData
sheet at a lower level of coding than VBA. Is there a way
to rename the sheet at that level (API code maybe?) or do
I have to stick with copying the data to another sheet and
deleting the TransferSpreadsheet sheet?
Thanks,
Rich