View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Trouble w/ ActiveX Controls (no userform) Excel 2002.

Chris,

The range objects you use are not "qualified"
e.g. are not pointed to a specific worksheet object.
It may be an Activesheet object, but in your case it's probably
a worksheet in the workbook from which you run the code.

ThisWorkbook.Worksheets("controls").Range("mynamed range")
would work best

Also remember that when you use ControlSource (which accepts cell's
address strings) to ALWAYS use the EXTERNAL address for a range.
(which is a fully qualifid address of workbook/sheet/range)

MyComboBOx1.ControlSource= myRng.address(external:=true)

This way you're sure you KNOW where it points, regardless of which book
or sheet is active when the form is loaded.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Chris" wrote:

Patrick thanks for your reply.

In the workbook I have range names setup that I feed the
combo box values to. The main issue I am having is a (Run-
Time error '1004': Method 'Sheets' of object'_Global)
Error. This occurs in the cboBatesNumbering_Change
procedure below. If you could help me to correct the
syntax or structure of the code so it doesn't error out at
run time I would be forever indebted to you.
Unfortunately my project time on this is overdue. Thanks.

-----Original Message-----