Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,comp.databases.ms-access
|
|||
|
|||
Finding Real Worksheet Name After Access Export
[Sorry for the cross-post, but it may be an issue either group may
have the answer to through experience.] I'm working on some procedures where Access queries are exported to Excel, and then later on, those same workbooks are openned, and I need to target a specific original sheet. Sometimes there will be multiple sheets in the same workbook, sometimes only a single tab. The issue is this: Save query "XLTest - qryExport" to file and the worksheet name becomes "XLTest___qryExport" (three underscores). I have a generic procedure which performs the export, so if exported multiple times, there is no error. However, if saved manually (File | Save As...), I'll get "The object 'XLTest - qryExport' already exists...". Looking at Worksheet.Name in Excel, I can find "XLTest___qryExport". I've tried browsing the entire object tree but don't see "XLTest - qryExport" anywhere. Is it there, or is Access throwing out this message after interpreting a message thrown back from trying to save the query object? Thanks in advance. Again, sorry for the cross-post. Anthony. |
#2
Posted to microsoft.public.excel.programming,comp.databases.ms-access
|
|||
|
|||
Finding Real Worksheet Name After Access Export
|
#3
Posted to microsoft.public.excel.programming,comp.databases.ms-access
|
|||
|
|||
Finding Real Worksheet Name After Access Export
Access gives you a failure message using the term
'XLTest - qryExport' because that is what you tried to export, not because Excel has a sheet of that name. (david) "Anthony Cuttitta Jr." wrote in message om... [Sorry for the cross-post, but it may be an issue either group may have the answer to through experience.] I'm working on some procedures where Access queries are exported to Excel, and then later on, those same workbooks are openned, and I need to target a specific original sheet. Sometimes there will be multiple sheets in the same workbook, sometimes only a single tab. The issue is this: Save query "XLTest - qryExport" to file and the worksheet name becomes "XLTest___qryExport" (three underscores). I have a generic procedure which performs the export, so if exported multiple times, there is no error. However, if saved manually (File | Save As...), I'll get "The object 'XLTest - qryExport' already exists...". Looking at Worksheet.Name in Excel, I can find "XLTest___qryExport". I've tried browsing the entire object tree but don't see "XLTest - qryExport" anywhere. Is it there, or is Access throwing out this message after interpreting a message thrown back from trying to save the query object? Thanks in advance. Again, sorry for the cross-post. Anthony. |
#5
Posted to microsoft.public.excel.programming,comp.databases.ms-access
|
|||
|
|||
Finding Real Worksheet Name After Access Export
Gotcha. So it's as I assumed. It made the attempt, received an
error, then sent back a response with using the name IT was trying, not what it found on the other end. "david epsom dot com dot au" <david@epsomdotcomdotau wrote in message om.au... Access gives you a failure message using the term 'XLTest - qryExport' because that is what you tried to export, not because Excel has a sheet of that name. (david) "Anthony Cuttitta Jr." wrote in message om... [Sorry for the cross-post, but it may be an issue either group may have the answer to through experience.] I'm working on some procedures where Access queries are exported to Excel, and then later on, those same workbooks are openned, and I need to target a specific original sheet. Sometimes there will be multiple sheets in the same workbook, sometimes only a single tab. The issue is this: Save query "XLTest - qryExport" to file and the worksheet name becomes "XLTest___qryExport" (three underscores). I have a generic procedure which performs the export, so if exported multiple times, there is no error. However, if saved manually (File | Save As...), I'll get "The object 'XLTest - qryExport' already exists...". Looking at Worksheet.Name in Excel, I can find "XLTest___qryExport". I've tried browsing the entire object tree but don't see "XLTest - qryExport" anywhere. Is it there, or is Access throwing out this message after interpreting a message thrown back from trying to save the query object? Thanks in advance. Again, sorry for the cross-post. Anthony. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel worksheet export into access table | Excel Worksheet Functions | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
Finding real values of a function | Excel Worksheet Functions | |||
Export Worksheet to Access | Excel Programming | |||
Export Worksheet to Access | Excel Programming |