Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-15-2015, 08:48 AM
ksigcajun ksigcajun is offline Option Button help Windows 7 64bit Option Button help Office 2010 64bit
Advanced Beginner
Option Button help
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default Option Button help

I have two option buttons for users to select one or the other.

I currently have some text with content control fields in a paragraph (bookmarked BM4) below the buttons. If a user chooses OptionButton1, it would do nothing, but keep the text present. If OptionButton2 is chosen, it would delete the text which is in Bookmark BM4.

I would like OptionButton1 to not only do nothing if chosen first, but Id love for it to undo the deletion in case a user chooses OptionButton2 first and decided it wanted to keep the text and chose OptionButton1.

My code in OptionButton1 isnt working properly. Any help?



PHP Code:
Private Sub OptionButton1_Click()
If 
Me.OptionButton1.Value True Then
ActiveDocument
.Undo
End 
If
End Sub
 
Private Sub OptionButton2_Click()
If 
Me.OptionButton2.Value True Then
  ActiveDocument
.Bookmarks("BM4").Select
Selection
.Delete
End 
If
End Sub 
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Button selected will display text ksigcajun Word VBA 7 07-14-2014 09:31 AM
Option Button help How to run two button macros with one button? Geza59 Excel Programming 1 02-14-2013 12:11 AM
printing option JadePriest Excel 1 09-21-2012 10:27 AM
Help on option button active X aligahk06 Excel 0 11-03-2009 11:39 PM
Option Button ( ACtive X Control ) aligahk06 Excel 0 11-03-2009 06:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:59 PM.


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