Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How Do I Get SetFocus To Work???

Greetings,

I am trying to use SetFocus on my UserForm and I keep getting this
error:

Run-time error '-2147418113 (8000ffff)':
Unexpected call to method or property access.

The debugger then highlights this line:

BankFrame.Visible = True
CBox1.SetFocus <<<<


CBox1 is the first item on a frame this line comes just after the
frame is made visible. If I 'rem' out the line the code the rest of
the code works with mouse clicks to get the focus. It's the same with
getting off the frame.

Does anyone have any idea as to what is going on???

Any help would be appreciated.

TIA

-Minitman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How Do I Get SetFocus To Work???

Correction:

It seems I was mistaken, it only bombs out when I attempt to SetFocus
on the frame. Coming off the frame with SetFocus is working. Any
help on getting SetFocus to work going onto the frame would be
appreciated.

TIA

-Minitman

On Sun, 07 Nov 2004 00:43:25 -0600, Minitman
wrote:

Greetings,

I am trying to use SetFocus on my UserForm and I keep getting this
error:

Run-time error '-2147418113 (8000ffff)':
Unexpected call to method or property access.

The debugger then highlights this line:

BankFrame.Visible = True
CBox1.SetFocus <<<<


CBox1 is the first item on a frame this line comes just after the
frame is made visible. If I 'rem' out the line the code the rest of
the code works with mouse clicks to get the focus. It's the same with
getting off the frame.

Does anyone have any idea as to what is going on???

Any help would be appreciated.

TIA

-Minitman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How Do I Get SetFocus To Work???

I am not sure I really understand what you are saying, coming off and going
on to the frame, but have you tried

Frame1.CBox1.SetFocus

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Minitman" wrote in message
...
Correction:

It seems I was mistaken, it only bombs out when I attempt to SetFocus
on the frame. Coming off the frame with SetFocus is working. Any
help on getting SetFocus to work going onto the frame would be
appreciated.

TIA

-Minitman

On Sun, 07 Nov 2004 00:43:25 -0600, Minitman
wrote:

Greetings,

I am trying to use SetFocus on my UserForm and I keep getting this
error:

Run-time error '-2147418113 (8000ffff)':
Unexpected call to method or property access.

The debugger then highlights this line:

BankFrame.Visible = True
CBox1.SetFocus <<<<


CBox1 is the first item on a frame this line comes just after the
frame is made visible. If I 'rem' out the line the code the rest of
the code works with mouse clicks to get the focus. It's the same with
getting off the frame.

Does anyone have any idea as to what is going on???

Any help would be appreciated.

TIA

-Minitman




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How Do I Get SetFocus To Work???

Hey Bob,

I just tried this and get the following error message:

Run-time error '2147417113 (8000ffff)':
Unexpected call to method or property access.

What does this mean and how do I fix it????

Any help would be appreciated.

TIA

-Minitman



On Sun, 7 Nov 2004 10:32:44 -0000, "Bob Phillips"
wrote:

I am not sure I really understand what you are saying, coming off and going
on to the frame, but have you tried

Frame1.CBox1.SetFocus

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Minitman" wrote in message
.. .
Correction:

It seems I was mistaken, it only bombs out when I attempt to SetFocus
on the frame. Coming off the frame with SetFocus is working. Any
help on getting SetFocus to work going onto the frame would be
appreciated.

TIA

-Minitman

On Sun, 07 Nov 2004 00:43:25 -0600, Minitman
wrote:

Greetings,

I am trying to use SetFocus on my UserForm and I keep getting this
error:

Run-time error '-2147418113 (8000ffff)':
Unexpected call to method or property access.

The debugger then highlights this line:

BankFrame.Visible = True
CBox1.SetFocus <<<<

CBox1 is the first item on a frame this line comes just after the
frame is made visible. If I 'rem' out the line the code the rest of
the code works with mouse clicks to get the focus. It's the same with
getting off the frame.

Does anyone have any idea as to what is going on???

Any help would be appreciated.

TIA

-Minitman




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


Similar Threads
Thread Thread Starter Forum Replies Last Post
setfocus after a msgbox simpleMod Excel Programming 1 October 26th 04 04:35 PM
SetFocus using variable name Bob Phillips[_6_] Excel Programming 0 December 4th 03 09:47 PM
SetFocus problem RFraley Excel Programming 2 September 7th 03 01:18 PM
TextBox.SetFocus steve Excel Programming 4 July 16th 03 07:40 PM


All times are GMT +1. The time now is 05:36 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"