LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Taking control from Option Button into RefEdit in Excel 2010 behaving oddly

Hi,

I have a form that have a set of Option Buttons (rdbOutRange, rdbNWB, and rdbNWS) and a RefEdit (redOutputRange).

When I select the Option Button (rdbOutRange), I want it put the cursor in the RefEdit (redOutputRange).

My current code does this. But if I select something else, and then reselect Option A, it doesn't work anymore.

It looks like that the code is stuck at the next line if I put a Breakpoint on the SetFocus line.

My code is the following:
Private Sub rdbOutRange_Change()

Application.EnableEvents = False
If Me.rdbOutRange.Value = True Then
Me.redOutputRange.Enabled = True
Me.redOutputRange.SetFocus
Else
Me.redOutputRange.Value = ""
Me.redOutputRange.Enabled = False
End If
Application.EnableEvents = True

End Sub

What I am doing wrong?

Thanks,
Mike
 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF behaving oddly PBcorn Excel Programming 0 August 5th 08 03:09 PM
Select Case Behaving Oddly Kris_Wright_77 Excel Programming 3 June 6th 06 07:06 PM
OFFSET behaving oddly Ryan Poth Excel Worksheet Functions 2 May 30th 06 07:29 AM
=ISODD Behaving Oddly Craig[_15_] Excel Programming 5 April 30th 04 08:59 PM


All times are GMT +1. The time now is 10:16 PM.

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

About Us

"It's about Microsoft Excel"