Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-09-2019, 08:57 PM
NoSparks NoSparks is offline Falling at the last hurdle with Checkboxes and Option buttons Windows 7 64bit Falling at the last hurdle with Checkboxes and Option buttons Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Quote:
In place of the loops write 3 lines for sheets and 3 lines for optionbuttons each using the actual name.

You've completely lost me - I'm afraid that I really need some assistance with what you mean.
The old Private Sub OptionButton1_Change() would become something like this,
although I don't think VBA accepts a control name with a space in it.
Code:
Private Sub NextGen_Change()
     If NextGen.Value = True Then
        ' this replaces the loop
        Me.Controls(NextGen).BackColor = RGB(244, 244, 244)
        Me.Controls(Advanced).BackColor = RGB(244, 244, 244)
        Me.Controls(All Future).BackColor = RGB(244, 244, 244)
        Sheets("Report template - NextGen").Visible = True
        Sheets("Report template - Advanced").Visible = True
        Sheets("Report template - All Future").Visible = True
        '
        Sheets(Array("Report template - Advanced", "Report template - All Future")).Visible = False
        Sheets("Report template - NextGen").Activate
        Range("H4").Select
        SendKeys "%{down}", True
        NextGen.BackColor = RGB(128, 255, 128)
        cmdContinue.Enabled = True
     End If
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons - linking and control natelfo Visio 8 01-25-2024 02:01 AM
Option buttons for multiple choice questions ScottishPolarBear Word 4 12-02-2014 02:23 PM
Display cells dependent on option buttons inq80 Excel 0 09-01-2014 03:40 PM
How do you achieve Falling letters? PPT PowerPoint 0 04-21-2012 06:12 AM
Falling at the last hurdle with Checkboxes and Option buttons Word 2007 Option buttons - transparency JacobThomas Word VBA 1 11-02-2011 05:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft