Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default do xl add-ins have worksheets?

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default do xl add-ins have worksheets?

all excel workbooks must have at least on sheet. An addin is a special
workbook.

you can reference the sheet the same as you would any sheet (without
selecting)

set sh = Workbooks("MyAddin.xla").Worksheets(1)
sh1.Range("A1").Value = 10

or for code within the addin

set sh = thisworkbook.worksheets(1)



--
Regards,
Tom Ogilvy


"big t" wrote:

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default do xl add-ins have worksheets?

Yes XLA addins can have as many worksheets as you want. from VBA you can use
code like
Thisworkbook.worksheets("Sheet1").range("A1")
to refer to them.
If you modify any cells on these sheets you have to save the XLA otherwise
the modifications are lost when Excel closes.

Charles
______________________
Decision Models
FastExcel 2.3 now available
Name Manager 4.0 now available
www.DecisionModels.com

"big t" wrote in message
...
hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that
if
there is a useable sheet in the add-in i can use that.

TIA,
big t



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default do xl add-ins have worksheets?

Yes, add-ins have at least one worksheet, but the worksheets are not
visible.

You *can* use that sheet to store options - just make sure to have the
add-in save itself when the options are changed.

This is generally not the best practice, however. If others use the
add-in, you can't be sure they have write access to the add-in's
directory, and it's somewhat more vulnerable to corruption.

In article ,
big t wrote:

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default do xl add-ins have worksheets?

thanks for your answers.

just one more question...

....how come i can't see the sheets even though they are allegedly visible?

cheers
big t

"big t" wrote:

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default do xl add-ins have worksheets?

Addins are designed to be invisible to the user.

Likewise, go to Window = Hide and hide a workbook.

from the immediate window:
? workbooks("Book2").Windows(1).Visible
False
? workbooks("Book2").Worksheets(1).Visible = xlSheetVisible
True


So sheet visibility is an attribute that is interpreted by excel to
determine whether the sheet is actually visible to the User.

--
Regards,
Tom Ogilvy

"big t" wrote:

thanks for your answers.

just one more question...

...how come i can't see the sheets even though they are allegedly visible?

cheers
big t

"big t" wrote:

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default do xl add-ins have worksheets?

i getcha. thanks Tom.

cheers
big t


"Tom Ogilvy" wrote:

Addins are designed to be invisible to the user.

Likewise, go to Window = Hide and hide a workbook.

from the immediate window:
? workbooks("Book2").Windows(1).Visible
False
? workbooks("Book2").Worksheets(1).Visible = xlSheetVisible
True


So sheet visibility is an attribute that is interpreted by excel to
determine whether the sheet is actually visible to the User.

--
Regards,
Tom Ogilvy

"big t" wrote:

thanks for your answers.

just one more question...

...how come i can't see the sheets even though they are allegedly visible?

cheers
big t

"big t" wrote:

hi everyone,

i always thought that xl add-ins do not have worksheets, but in the vbe i
can see Sheet1 (Sheet1) under Microsoft Excel Objects under my add-in.

and the 'Visible' property for this worksheet is -1 - xlSheetVisible.

basically, i want to use my add-in to store some options for the user, and
i'm looking for the easiest way to do this. i don't really want to mess
around with the registry or ini files if i can avoid it and i figured that if
there is a useable sheet in the add-in i can use that.

TIA,
big t

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How use info in Excel shared worksheets to create new worksheets dkc Excel Worksheet Functions 0 June 28th 07 08:36 PM
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? TS Excel Programming 0 December 27th 06 02:49 PM
VBA / Macro for creating new worksheets and new columns from existing worksheets webby2006 Excel Programming 3 July 25th 06 03:38 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM
Need code to protect worksheets - amount of worksheets varies Sandy[_3_] Excel Programming 1 September 9th 03 02:17 AM


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

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

About Us

"It's about Microsoft Excel"