ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   More than 1 workbook in a VBAProject (https://www.excelbanter.com/excel-programming/299650-more-than-1-workbook-vbaproject.html)

R Avery

More than 1 workbook in a VBAProject
 
I have a workbook that I inherited, but it has the strange property of
having a "ThisWorkbook" object and a "ThisWorkbook1" object. There are
also several sheet objects that do not correspond to any worksheet,
visible or otherwise, and when I look at the properties window when
selecting those sheets on the Project Explorer, these phantom sheets
have the properties of "ThisWorkbook1".


It is very strange. I asked a microsoft expert here at work and he said
that its just not possible. The file was somehow corrupted. However,
it continues to work properly, and I have been using it for almost a year.

I am just curious what this is, what exactly it means, and how it might
have happened. Does anyone know? If anyone wants to see it, I can
strip it of all company-specific data, and send them the workbook with
the two ThisWorkbook objects.

pikus

More than 1 workbook in a VBAProject
 
I would like to see that. Please post it or e-mail it to me:

Thanks

--
Message posted from
http://www.ExcelForum.com


DNF Karran[_17_]

More than 1 workbook in a VBAProject
 
Pikus,

Could you add it this thread as i'm curious too!!

All i can think of is a class module has been used or an objec
variable is defined somewhere....

Dunca

--
Message posted from http://www.ExcelForum.com


Tushar Mehta

More than 1 workbook in a VBAProject
 
Please, no.

Do *not* post workbooks as attachments to newsgroup posts.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , DNF Karran
says...
Pikus,

Could you add it this thread as i'm curious too!!

All i can think of is a class module has been used or an object
variable is defined somewhere....

Duncan


---
Message posted from http://www.ExcelForum.com/



pikus

More than 1 workbook in a VBAProject
 
Why not

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

More than 1 workbook in a VBAProject
 
Pikus , your in the Excel Forum; Tushar is in a newsgroup. For the forum,
there are provisions for attaching binaries - so you can post them there if
you desire. For the newsgroup, it is discouraged because of the storage
overhead and so forth since this is a non-binaries newsgroup. R Avery is
posting in the newsgroup.

--
Regards,
Tom Ogilvy

"pikus " wrote in message
...
Why not?


---
Message posted from http://www.ExcelForum.com/




R Avery

More than 1 workbook in a VBAProject
 
No, the "ThisWorkbook" and "ThisWorkbook1" both have the same worksheet
icon with the little green "XL".

In a new workbook, I tried exporting and re-importing "ThisWorkbook".
It was imported as a class module with the standard class module icon.
This is not what has happened to the workbook I am talking about.

R Avery

More than 1 workbook in a VBAProject
 
I will not post the workbook to the newsgroup, but rather email it to
anyone who gives me their email address.

R Avery

More than 1 workbook in a VBAProject
 
Also, you know how you can refer to a worksheet by its code name? Well,
I tried to do that for the phantom sheets, "?Sheet1.Name" in the
immediate window, and I get the following error:

Run-time error '429':
ActiveX component can't create object


All times are GMT +1. The time now is 11:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com