Reference Command Button

C

CR

I have a worksheet, we'll say Sheet 1, that does a web query. I have two
command buttons setup that turn the query on/off.

On either the workbook Open or Beforeclose, I want to make one of the
buttons visible = false.

When I put the code in ThisWorkbook module, I don't seem to know how to
reference the button (or maybe the sheet?)

I get an object required error as soon as it gets to my Cmd_Stop.Visible =
False line.
How do I properly point to it?


Thanks
 
D

Dave Peterson

Check your earlier post.
I have a worksheet, we'll say Sheet 1, that does a web query. I have two
command buttons setup that turn the query on/off.

On either the workbook Open or Beforeclose, I want to make one of the
buttons visible = false.

When I put the code in ThisWorkbook module, I don't seem to know how to
reference the button (or maybe the sheet?)

I get an object required error as soon as it gets to my Cmd_Stop.Visible =
False line.
How do I properly point to it?

Thanks
 
C

CR

Sorry about the double post.
It was my first post using Giganews. When I hit send on the first one I got
an error saying my password was wrong and it couldn't send. I retyped my
password and recived no error the second time.
CR
 
D

Dave Peterson

Not a problem.

But my reply serves a couple of purposes. First, it tells you that you do have
a response and second, it tells others that you have a response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top