View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Question about accessing worksheets on an AddIn file

Depends on what you mean.

All of these worked ok for me:

Option Explicit
Sub testme()

Dim myAddin As Workbook
Dim wks As Worksheet

Set myAddin = Workbooks("personal.xla")

Set wks = ActiveSheet

wks.Range("a1").Value = myAddin.Worksheets("sheet1").Range("b9").Value

myAddin.Worksheets("sheet1").Range("a1:b99").Copy _
Destination:=wks.Range("b33")

myAddin.Worksheets("sheet1").Copy _
after:=wks

End Sub

But sheet1 in personal.xla was visible (when I toggled .isaddin to false for
personal.xla).



39N95W wrote:

Excel 2002
Windows XP Pro

I am thinking of creating an Excel AddIn file that will compare two
databases (other Excel files actually). My first question is: can I access
data or information on any of the worksheets in the *.xla file and copy and
paste it to another regular *.xls file? If I'm not mistaken an *.xla file
is not part of the workbooks collection, so I'm wondering if what I'm asking
is impossible. Thanks!

-gk-


--

Dave Peterson