Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Excel Add-in

I developed some code in an Excel Workbook. It all worked fine. I did "Save
as" - and selected "add-in." I'm using Excel 2002. In another sheet - I try
to select this add-in from Tools/Addins. I get errors when my code tries to
reference any sheet in the original workbook. For example a line like this:

Dim xs as Excel.Worksheet
Set xs = Application.Workbooks("MyCodeWorkBook.xls")

This line causes an error - subscript out of range in the add-in but works
from my "code sheet."

It is like the "add-in" does not see it's own workbook - when running as a
add-in. Any advice appreciated.

Steve


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Excel Add-in

A workbook is made up of many worksheets. So when you say that a worksheet is a workbook
then you ask for trouble.

--
HTH. Best wishes Harald
Excel MVP

Followup to newsgroup only please.

"S. Daum" wrote in message
...

Dim xs as Excel.Worksheet
Set xs = Application.Workbooks("MyCodeWorkBook.xls")



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"