Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Send a frame control to a procedure as a parameter

I have code which will enable one of 10 frames on a form depending on a
control parameter which is predetermined. Here is my code which enables a
fram control and all controls within it:

Private Sub ActivateFrameAndControls(ByRef aFrame As Object)
aFrame.Enabled = True
' Cycle thru all controls in the respective frame.
For Each InnerCtrl In aFrame.Controls
' Enable each one.
InnerCtrl.Enabled = True
Next InnerCtrl
End Sub

My problem is that my calling code will pass th frame to the procedure, but
the line "aFrame.Enabled = True" fails with the error "Runtime error 438.
Object does not support this property or method".

Here's my calling code:

If bShowApp Then ActivateFrameAndControls (Me.fraApp)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Send a frame control to a procedure as a parameter

Found the problem....it was in my calling code. It should have been:

If bShowApp Then Call ActivateFrameAndControls (Me.fraApp)

--

|
+-- JDMils
|

"JDMils" wrote in message
...
I have code which will enable one of 10 frames on a form depending on a
control parameter which is predetermined. Here is my code which enables a
fram control and all controls within it:

Private Sub ActivateFrameAndControls(ByRef aFrame As Object)
aFrame.Enabled = True
' Cycle thru all controls in the respective frame.
For Each InnerCtrl In aFrame.Controls
' Enable each one.
InnerCtrl.Enabled = True
Next InnerCtrl
End Sub

My problem is that my calling code will pass th frame to the procedure,
but the line "aFrame.Enabled = True" fails with the error "Runtime error
438. Object does not support this property or method".

Here's my calling code:

If bShowApp Then ActivateFrameAndControls (Me.fraApp)




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
Use VBA to control scrollbars in a Frame gary Excel Programming 0 May 26th 06 10:17 PM
user form and frame control Gixxer_J_97[_2_] Excel Programming 1 February 11th 05 10:26 PM
tab order in frame control mike Excel Programming 2 February 19th 04 03:42 PM
userform frame control Jo[_4_] Excel Programming 2 September 20th 03 12:38 AM
Passing parameter from Excel to stored procedure? hmmm... Excel Programming 1 July 25th 03 02:59 PM


All times are GMT +1. The time now is 01:33 PM.

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"