Re: Command button continues to be visible!



Are your sure the button is named "alfa", I don't mean as seen in the names
box left of input bar but in Properties. If the following works that's
confirm you have got your names mixed up.

With Active***.OLEObjects("alfa")
.Visible = Not .Visible
End With

Regards,
Peter T


"CAPTGNVR" <CAPTGNVR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:62023439-2BB3-4F92-9016-6AEE5109AC0E@xxxxxxxxxxxxxxxx
D/Peter

sheets("sheet1").select

With Active***.alfa
.Visible = Not .Visible
End With




"Peter T" wrote:

Post the your code, I mean the actual code.

Regards,
Peter T

"CAPTGNVR" <CAPTGNVR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:21AD6937-E3ED-4C54-BAD2-B9E0446D3D7E@xxxxxxxxxxxxxxxx
D/Peter

Yes this code worked in the new ***.

But I tried the same by placing a new command button and tried and the
command button continues to be seen.

Thnks for the folow up. Pls adv.

brgds/captgnvr

"Peter T" wrote:

In a new *** add a button named CommandButton1 and run the following
from
an ordinary module, obviously with the *** active.

With Active***.CommandButton1
.Visible = Not .Visible
End With

For me this toggles visibility of the button in Excel-97, as expected.

Regards,
Peter

PS, what does D/Pter mean


"CAPTGNVR" <CAPTGNVR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4F7287A7-87E3-44AE-B324-F57EA9CC6D4E@xxxxxxxxxxxxxxxx
D/Pter

After your suggestion about the design mode checked it is not in
design
mode
and also ensured that the *** is not protected.

The below line works
Active***.alfa.caption= "bingo"

The below line does not work
Active***.alfa.Visible = False

Using Excel 97.

Why I require it to be visible is bcos it is a big command button
and
want
to be visible only when export operations are going on. So I used
this
above
code at the end of the procedure so that once the code is run they
dont
see
this command button.

Pls help, as I will be watching with curiosity as dont understand
why
it
is
not working.

brgds/captgnvr




"Peter T" wrote:

That works fine for me in Excel-97. Going into design mode might
make
it
visible until exiting

Regards,
Peter T

"CAPTGNVR" <CAPTGNVR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4A91FF82-456E-4202-A8F8-8627A3E4785B@xxxxxxxxxxxxxxxx

Dear All
The following code does not give any errors but the command
button
named
as
'alfa' continues to be visible in excel-97; command button from
control
toolbox.

Active***.alfa.Visible = False

Pls advice.

brgds/captgnvr











.


Loading