View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Good_Ol_glr Good_Ol_glr is offline
external usenet poster
 
Posts: 1
Default Cross-Workbook Data/Function Referance

I am in the habit of writing data-processing & computation functions in
my 'XLSTART/PERSONAL.XLS' workbook ( PRX) VBA modules Normally , I reference
data in the active worksheet by renge or name reference.
Recently I got clever and decided that some 'global' data was better
left in my PRX workbook on a (named) worksheet, to be referenced by functions
in PRX . However, any attempt to reference data in PRX seems to fail -
aborting Excel(97).
The statements
Dim xb as workbook,xs as worksheet '1
Set xb = Workbooks("personal.xls") '2
set xs = xb.Worksheets("mydata") '3
fail at line 3.
Am I breaking some rule here ? Is their some option I need to set.
Am I just being a bad person ?