Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default userform: object required

I got an error saying "object required" when the script attempted
to display a userform. What is VBA looking for?

The error only occurs when I programmatically insert the code via
VBA. If I copy and paste the code to worksheet's selectionchange
event procedure, it runs fine.

Private sub worksheet_selectionchange(.....)
aboutme.show 'aboutme is a userform
end sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default userform: object required

What code are you using to create the VBA code that shows the form? It is
possible that you'll need to force a compile.

With Application.VBE.CommandBars.FindControl(ID:=578)
If .Enabled = True Then
.Execute
End If
End With




"John Smith" wrote in message
...
I got an error saying "object required" when the script attempted
to display a userform. What is VBA looking for?

The error only occurs when I programmatically insert the code via
VBA. If I copy and paste the code to worksheet's selectionchange
event procedure, it runs fine.

Private sub worksheet_selectionchange(.....)
aboutme.show 'aboutme is a userform
end sub



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
Object required Arne Hegefors Excel Programming 1 September 21st 06 12:34 PM
Object Required Patrick Simonds Excel Programming 5 August 5th 06 08:08 AM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM
Object required? davegb Excel Programming 14 November 15th 05 10:35 PM


All times are GMT +1. The time now is 08:14 AM.

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"