Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
I'm working with an Excel file that was the output of Oracle's older version of ADI (Application Desktop Integrator)... the version of ADI that was a deskop app itself, and may be running some old Excel things. There's a code module called "CODE" in it, which shows as a module in the VBE. But, when asked how many sheets the file has, Msgbox ActiveWorkbook.Sheets.Count , the module with the CODE is being included as a sheet. I've proved this by removing the module CODE, and it then reports 29 sheets. Originally, I had thought they probably had a sheet with property visible = xlVeryHidden , but that was not the case. Is there a property somehwere where I can tell when a module of code is being included in the sheet count? Thanks, Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would look at the project window in VBA. The window shows the sheet number
and the sheet name. "mark" wrote: Hi. I'm working with an Excel file that was the output of Oracle's older version of ADI (Application Desktop Integrator)... the version of ADI that was a deskop app itself, and may be running some old Excel things. There's a code module called "CODE" in it, which shows as a module in the VBE. But, when asked how many sheets the file has, Msgbox ActiveWorkbook.Sheets.Count , the module with the CODE is being included as a sheet. I've proved this by removing the module CODE, and it then reports 29 sheets. Originally, I had thought they probably had a sheet with property visible = xlVeryHidden , but that was not the case. Is there a property somehwere where I can tell when a module of code is being included in the sheet count? Thanks, Mark |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would look at the project window in VBA. The window shows the sheet
number and the sheet name. In a normal Excel file, I'd agree with you. However, this time, "No it doesn't." There are 29 sheets listed in the 'Microsoft Excel Objects' folder (and no, I didn't miscount). Yet, the code msgbox activeworkbook.sheets.count reports 30. There is one object in the 'Modules' folder, whose name is CODE . If I delete that module, the MsgBox ActiveWorkbook.Sheets.Count reports 29. So the code module is being reported as a sheet, which was my question. Is there a way I can tell in the code when that is the case? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this.
Worksheet.Type can be the following xlChart xlDialogSheet xlExcel4IntlMacroSheet xlExcel4MacroSheet xlWorksheet Use following code For Each Ws In Workbooks Ws.Activate If ActiveCell.Worksheet.Type = xlWorksheet Then End If Next Ws "mark" wrote: Hi. I'm working with an Excel file that was the output of Oracle's older version of ADI (Application Desktop Integrator)... the version of ADI that was a deskop app itself, and may be running some old Excel things. There's a code module called "CODE" in it, which shows as a module in the VBE. But, when asked how many sheets the file has, Msgbox ActiveWorkbook.Sheets.Count , the module with the CODE is being included as a sheet. I've proved this by removing the module CODE, and it then reports 29 sheets. Originally, I had thought they probably had a sheet with property visible = xlVeryHidden , but that was not the case. Is there a property somehwere where I can tell when a module of code is being included in the sheet count? Thanks, Mark |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
xl97 added the VBE. xl95 and before used macro sheets.
It sounds like the old program is creating a file using xl95. I think I did the same thing (but it was a long time ago). I exported the module, deleted that module and reimported it. (I needed that code.) mark wrote: Hi. I'm working with an Excel file that was the output of Oracle's older version of ADI (Application Desktop Integrator)... the version of ADI that was a deskop app itself, and may be running some old Excel things. There's a code module called "CODE" in it, which shows as a module in the VBE. But, when asked how many sheets the file has, Msgbox ActiveWorkbook.Sheets.Count , the module with the CODE is being included as a sheet. I've proved this by removing the module CODE, and it then reports 29 sheets. Originally, I had thought they probably had a sheet with property visible = xlVeryHidden , but that was not the case. Is there a property somehwere where I can tell when a module of code is being included in the sheet count? Thanks, Mark -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to count without included duplicate records | Excel Worksheet Functions | |||
How do I keep blank pages from being included in header count? | Excel Worksheet Functions | |||
count number of items in a row? help *file included* | Excel Worksheet Functions | |||
Find and Replace code in Sheet modules | Excel Programming | |||
When to code in sheet or userform modules and when to use modules | Excel Programming |