View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
nemadrias nemadrias is offline
external usenet poster
 
Posts: 20
Default Referencing code outside of current sheet

Wow - don't I feel stupid - basic instantiation. Brainfart...thanks a
ton.
Steve


ikr wrote:
"nemadrias" wrote in message
oups.com...
Hi -
I have an enormous piece of code that consists of a bunch of loops (I
know, I know, but it works and its fast enough for me). The code is
tied to a click event of a button, but its so much code that I had to
move half of it into a module outside of the sheet. The first half
(the half inside the sheet) runs fine, but when I call the module with
the second half, I get an "Object Required" error at the line below
(the first line of code). This is just a small portion of the second
half of the code - do you know what my problem is? Obviously it
doesn't recognize the cboCategory as an object, but why? Thanks in
advance...


You'll need to use
sheet1.cboCategory.Text ...
or whatever the sheet name is where the button is. The sheet is the object
that's required.