Option group controlling objects

Hello All,

Is there a faster way of doing the following. It's kind of choppy when the 
objects disappear then reappear. I'm sure it's pretty obvious what I'm trying 
to do.

Private Sub OptionButton1_Click()
If OptionButton1.Value = True Then
    Label3.Visible = False
    Label4.Visible = False
    Label5.Visible = False
    Label6.Visible = True
    ComboBox1.Visible = False
    ComboBox2.Visible = False
    ComboBox3.Visible = False
    ComboBox4.Visible = True
    Label7.Visible = True
    Label8.Visible = True
    ComboBox5.Visible = True
    ComboBox6.Visible = True
End If
End Sub

Private Sub OptionButton2_Click()
If OptionButton2.Value = True Then
    Label3.Visible = True
    Label4.Visible = True
    Label5.Visible = True
    Label6.Visible = True
    ComboBox1.Visible = True
    ComboBox2.Visible = True
    ComboBox3.Visible = True
    ComboBox4.Visible = True
    Label7.Visible = False
    Label8.Visible = False
    ComboBox5.Visible = False
    ComboBox6.Visible = False
End If

Thanks in advance

-- 
Brian
0
Utf
5/19/2010 4:10:03 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
674 Views

Similar Articles

[PageSpeed] 40

(Untested) You could try putting this line at the beginning of **each** of 
your Click events...

Application.ScreenUpdating = False

and putting this line at the end of **each** of your Click events...

Application.ScreenUpdating = True

-- 
Rick (MVP - Excel)



"Brian" <Brian@discussions.microsoft.com> wrote in message 
news:2664B270-FA17-4873-B2FE-7A6D32E4A504@microsoft.com...
> Hello All,
>
> Is there a faster way of doing the following. It's kind of choppy when the
> objects disappear then reappear. I'm sure it's pretty obvious what I'm 
> trying
> to do.
>
> Private Sub OptionButton1_Click()
> If OptionButton1.Value = True Then
>    Label3.Visible = False
>    Label4.Visible = False
>    Label5.Visible = False
>    Label6.Visible = True
>    ComboBox1.Visible = False
>    ComboBox2.Visible = False
>    ComboBox3.Visible = False
>    ComboBox4.Visible = True
>    Label7.Visible = True
>    Label8.Visible = True
>    ComboBox5.Visible = True
>    ComboBox6.Visible = True
> End If
> End Sub
>
> Private Sub OptionButton2_Click()
> If OptionButton2.Value = True Then
>    Label3.Visible = True
>    Label4.Visible = True
>    Label5.Visible = True
>    Label6.Visible = True
>    ComboBox1.Visible = True
>    ComboBox2.Visible = True
>    ComboBox3.Visible = True
>    ComboBox4.Visible = True
>    Label7.Visible = False
>    Label8.Visible = False
>    ComboBox5.Visible = False
>    ComboBox6.Visible = False
> End If
>
> Thanks in advance
>
> -- 
> Brian 

0
Rick
5/19/2010 4:20:54 PM
Reply:

Similar Artilces:

Microsoft Office 12 Ribbon Control
Does anyone know of a third-party component vendor that makes an MFC-based ribbon control? I've seen the .Net version of the ribbon from DevComponents (DotNetBar) but I'd like to have pure MFC code if possible. Eric The guys at www.codejock.com said they are working on one, but there is no ETA as to when it would be released. Tom "Eric Hill" <eric@ijack.net> wrote in message news:op.s4xn0gbdsqk0wa@wcerich-6223.pioneer.world... > Does anyone know of a third-party component vendor that makes an MFC-based > ribbon control? > > I've seen the .Net...

Lookup value and control depends on lookup result
I have 1 qry & 1 form. Query named : QRY_bl_SalesInvoice BL no. Sales Invoice BL001 IV509999 BL002 (blank) BL003 IV507777 Under the FORM, drop-down box named “dropdownBL” is used by user to select BL no. under the qry on (a). Questions : How I set the following controls, Case 1 : If BL no. under the drop-down box “dropdownBL” after select = BL002 (with Sales Invoice=blank under the QRY) , then free to input on the field named “Sales Invoice" Case 2 : If BL no. under the drop-down box “dropdownBL” after select ...

global object dependent on CWinApp global object
hi I have a global object which depends on the CWinApp global object i.e. it assumes that the CWinApp global object is created. After migrating to VS 2005, my global object is getting created before the CWinApp global object. Is there any way I can force the CWinApp object to be created first? I know one of the solution is to avoid a global object and wrap it in a fuction, however a lot of files use this object directly, so I am trying to figure out if there is another way. Regards Chimanrao Chimanrao wrote: > hi > > I have a global object which depends on the CWinApp global...

Grouping like coloured cells
I have a conditional format set up to change cells different colours when certain conditions are met. I want to be able now to set up a separate table with all the same coloured cells in. I'm sure this is possible, however, I also want to be able to copy the row title into a section of the new table. Is there a way to do this? I have just changed the format of the chart. All I need to do now is form three seperate charts of positives, negatives and neutrals, however, they still need to be linked to the original row title. ...

Object required for (Wscript.sleep 15000) #2
Hi, We run the following macro in EXCEL in order to perform OS Backup, but we got the errors like: For Example: When we run the following macro in Excel, we got errors like: 1. Object required for (Wscript.sleep 15000) 2. Object required for (Wscript.Echo "Not in Archivelog Mode! Hot Backups not possible! Aborting!") 3. File Not found (strArchive = "arcchk.txt) (Set objArchive = objFS.OpenTextFile(strArchive, 1, 0) I think we have to define some variables in order to run that macro successfully. Could someone please suggest abo...

send object macro
I am trying to send a report or form from access via.email in an excel format so it can be edited and saved by another user. I am able to accomplish this except that the excel sheet is not formatted the way the person wants is there a better way of doing this or a different way that would have some kind of format? "jwebster1979" wrote: > except that the excel sheet is not formatted the way the person wants What format is this person expecting? Richard It is a fancy thing that looks better than it works it has some colors and and some drop downs. It wor...

How do I change a default Message Delivery option?
I have a user who has managed to change his default email option to have "Expires after" turned on by default. I would like it turned off. I've tried turning it off and saving it as a template, but I would like it off in the default case... ...

Outlook 2003 corrupted Task Reminder won't delete; options?
I'm running Outlook 2003 on a Vista PC. I have a Task Reminder that keeps coming up that I can't delete. I get the following message: "Cannot open the item for this reminder. Cannot locate recurrence information for this appointment. Data has become corrupted." How can I remove this reminder? Have you attempted to delete the task altogether and recreate it? "Ed Keeter" wrote: > I'm running Outlook 2003 on a Vista PC. I have a Task Reminder that keeps > coming up that I can't delete. I get the following message: > > &q...

Loop thru WinForm Controls
Hi All What is the code to loop thru all textbox controls on a form? TIA johnb Am 10.04.2010 17:53, schrieb johnb: > Hi All > What is the code to loop thru all textbox controls on a form? Inside the Form itself only or also inside other containers on the Form? The former (it's shorter ;-) ): 'assuming option infer on for each c in controls if typeof c is textbox then with directcast(c, textbox) .property = value end with end if next -- Armin "johnb" <johnb@discussions.microsoft.com> wrote in message ...

Calendar Control 8.0 question
Is it possible to restrict the date ranges of the Calendar Control 8.0?? I only want the year 2009 to be selected from the drop down box. Thank you! You can't change what is in the drop-down for years, but you can limit the year to 2009 on the calendar even if they select another year from the drop-down. Put the following code in the Worksheet code module that your calendar is on. Private Sub Calendar1_NewYear() Calendar1.Year = 2009 End Sub Mike F "Robert Crandal" <nobody@gmail.com> wrote in message news:loDNm.45264$de6.38509@newsfe21.iad....

Creating New Category Groups
I recently purchased Money 2004 and opened my older file in the new program. Several of my categories converted to unassigned Category Groups. I would like to create new Category Groups but I was unable to locate in the help menu the information needed to do this. Can someone help me with this? You can respond to me directly using my email address. Thank you. In microsoft.public.money, S. Link wrote: >I recently purchased Money 2004 and opened my older file >in the new program. Several of my categories converted to >unassigned Category Groups. I would like to create new >...

Object Explorer doesn't connect to server specified at startup
Hi Everybody, I'm constantly trying to shrink regular responsibilities into a single- click icon. Want me to check the server's hard drive size? I've got a script that gets hard drive space and sends a text report via SQL mail; all I need to do is click the SQLCMD batch file on my desktop. When starting SQL Server Management Studio (2005), I don't want to specify my server name, login, password, or the database I need; I prefer to run my desktop batch file that contains the following command: SqlWb.exe -E -S myservername -d testdb -nosplash This gets me into...

Outlook 2003 upgrade questions; "Grouping" view and OST file ...
Just upgraded Office from 2002 (XP) to 2003; a couple of questions arise: 1) Outlook icon is no longer on the desktop?? this wasn't just a shortcut; used to be able to use it to set profile options; have to do this from control panel now? 2) Every folder in Outlook (including public Exchange folders) is sorted by "Sent date", as intended, but now they are also "Group by" (View-Arrange by-Show in Groups). I hate this, and I can turn it off one folder at a time, but I have > 200 public folders!! How can I turn this foolishness off for all folders in one swoop? 3...

Distribution Group Access #2
Clarifying a little here. In Outlook, anyone can add someone to a distribution list. I want to prevent that, I have no idea how to secure that in AD. Do I secure it in AD? Joe "Joe" <anonymous@discussions.microsoft.com> wrote in news:11e0b01c3f57b $93daabf0$a401280a@phx.gbl: > In Outlook, anyone can add someone to a distribution > list. I want to prevent that, I have no idea how to > secure that in AD. Do I secure it in AD? > You mean a client side distribution list? There is no way to prevent that. What is your intent? Regards, -- Arlo Clizer Exc...

Ipad to exchange from outside the local network. Options?
We've got a very small exchange system consisting of 4 email accounts (SBS 2003). 2 of users have blackberries and we have BIS installed. We are no looking at ipod touch's and ipads as another way to access our email. This works great when you are on the LAN or at one of our persistant VPN'd locations, but does not work "off the network" I've tried to get the apple devices to VPN through our Checkpoint VPN-1 EDGE firewalls but am not having much luck. This would be optimal since it's secur and would place these devices on the network and then the emai...

Not in Group but mail still arrives
Hi I have a very strange problem. Windows 2000 server with Exchange 2000, Sophos pure mesaging all SP's applied. We have a distribution group info@domainname.com I removed a user from this group, however they still recieve mail sent to this group. I have even deleted the group and recreated it and added all relavant user with the exception of the problem user but they still get the mail. Help!!! Is the user an alternate recipient (user properties | exchange general | delivery options | forwarding address)? Remove all members and try adding them one by one, sending a test message aft...

Set DataNavigateUrlField to contained custom object property
I have a GridView bound to a collection of custom objects (e.g., Department). Each Department object contains a custom object (e.g., Manager). I want to use a property on the Manager object (e.g., Id) for the DataNavigateUrlFields property on my HyperLinkField, but setting DataNavigateUrlFields equal to Manager.Id (i.e., DataNavigateUrlFields="Manager.Id") does not work. How can I go about doing this? I have successfully exposed the Manager.Id property as a property on the Department object itself, but would prefer a more elegant solution, if possible. ...

Missing menu options
I was messing around the other day trying to change the format of a document in word and now somehow I have managed to change the available options in my drop-down menus, such as the Word menu in OS X. The "save," "save as," and, "print" options, among others, are totally missing. Is there a way to get these back or to reset word to have the default settings? I have trashed my preferences from the library/preferences folder and it didn't do anything. Thanks. In article <bcbb9b66.0402090640.23a67ecd@posting.google.com>, jkilligan@yahoo.com (jkilliga...

Email Tracking
Hi there. With Version 1.2 we could send out an email using MSCRM, and the response from the customer (assuming the token was left alone in the subject line) would also be aggregated to the history of activities - without user intervention. (So I would see both emails tracked against the customer's activity history without having to do anything) With version 3.0, the responses via email only come through to outlook and do not have the tracking done automcatically in MSCRM, eventhough the token is left inside the subject line. Users now need to manually click on "track in CRM"...

Resize multiple objects at one time
How can I resize multiple objects at one time and maintain proportions between all of the objects? Thank you. Select all ctrl+A, group (ctrl+shift+G). This won't work with text boxes, but you can select an option in AutoFit. (Edit menu). -- Mary Sauer http://msauer.mvps.org/ "MasonCross" <MasonCross@discussions.microsoft.com> wrote in message news:0054DCC1-0D91-4823-84C2-75BDAE62CEAC@microsoft.com... > How can I resize multiple objects at one time and maintain proportions > between all of the objects? Thank you. Mary Sauer wrote: > Select all ctrl+A, gro...

right click on objects not working
Hi, I am trying to asaign a macro to an inserted picture or even an object buit the right click doesn't work. I have done the following when I couldn't right click anywhere but I still can't get it to work on the pics/objects..here is what I did before Opened the VB Immediate window and typed application.commandbars("Cell").enabled = true any help apreciated. Is the worksheet protected? Is the workbook shared? Anthony wrote: > > Hi, > I am trying to asaign a macro to an inserted picture or even an object buit > the right click doesn't work. > I...

Macro Dialog Box Drop Down Options
I was just posed a question regarding the drop-down list in the Macro Dialog Box. Apparently, a previous user customized this list to include his own macros. I'm refering to the "Macros In" drop down box you get when selecting "Tools", "Macro", then "Macros" in Excel 2003. Anyhow, this person wants to know how to have the same thing happen on her laptop as happens on her "inherited" desktop and have this database of macros available from the drop down menu. Does anyone out there have any clue how this is done? EC The macros could be i...

Adding Outlook Address Book 'Contacts' per user through Group Poli
I am upgrading our users from Office XP to Office 2003 using Active Directory Group Poilicy Install with an MST file. The problem i am having is that after the install when the user logs on, i have to manually add their Personal Contacts by using the EMAIL ACCOUNT selection under TOOLS in outlook and then adding it as a new directory or address book; choosing additional address books and then selecting OUTLOOK ADDRESS BOOK. Can this be set up so that when a user, any user, and every user that uses a particular workstation logs onto that workstation, their Outlook Address Book is aut...

Disabling offline address book downloads by registry setting or Group Policy
I would like to push a registry change to disable downloading of an Offline Address Book when using Cached Mode. There is a serious bug that doesn't let modifications to an individual entry to be replicated to the OAB unless you delete the *.OAB files in the users profile and recreate them by downloading them again. Note that addions to the OAB are added to the OAB - the problem is just with *changes* made to entries already in the OAB. The normal way of setting this is Tools, Send/Receive Settings - All Accounts and unchecking the Download offline address book (which IS checked b...

Video control
Hi. I have a .mp4 video in a Windows 7 / Powerpoint 2003 presentation and it shows OK. I need to control the motion of the video: play, stop, rewind, etc. Is there a way? Thanks Martins .... a slider would be nice. I found it but I don't know how to connect it to the video. I can't find any reference about that ... may be it is not intended for that purpose. Martins You can't do that in PPT 2003. That function is available in 2010, which should be available sometime this summer. "Martins" wrote: > .... a slider would be nice. I found it but...