Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Is this possible?

I'm looking to display a form that shows the results of a query in a list
box.

The trick is that I'd like command buttons to be made visible dependant upon
whether there is an equivalent member of the list, something on the lines of
(pseduo-code)

instead of CommandButton1, CommandButton2 etc

CommandButton(counter).visible = True

Is this possible?

Jeff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Is this possible?

One way......

Setting the destination of the query to a worksheet and reading the contents
of this.
Not sure I know what you mean by 'Equivalent Member' but assume you mean
that the query returns values that you want to use test against a control
value. Need to understand exactly what you are trying to do, but you can
certainly make controls visible or not based on the results of the test.
Typically with

If value1 = value2 then CommandButton1.Visible=True

where value1 might be your test value and value2 a cell value from the
destination range

for example.
Cheers
Nigel

"Jeff Q" wrote in message
...
I'm looking to display a form that shows the results of a query in a list
box.

The trick is that I'd like command buttons to be made visible dependant

upon
whether there is an equivalent member of the list, something on the lines

of
(pseduo-code)

instead of CommandButton1, CommandButton2 etc

CommandButton(counter).visible = True

Is this possible?

Jeff






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Is this possible?

Hi Jeff,

CommandButton(counter).visible = True


Userform1.Controls("CommandButton" & counter).visible=True

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"