Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 1st, 2006, 02:55 PM
Fin Fin is offline
Registered User
Join Date: Jan 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default vbYesNo Msgbox

I am trying to display a userform that I have designed when the Yes button is selected but I keep getting the error message 'Run-time error '438': Object doesn't support this property or method'.

He is my code:

Private Sub cbSuppliersInv_AfterUpdate()
If cbSuppliersInv.Enabled Then
If cbSuppliersInv.Value = True Then
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to update supplier's invoice details?"
Style = vbYesNo + vbInformation + vbDefaultButton2
Title = "Please Confirm"
Help = "DEMO.HLP"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
Else ' User chose No.
    MyString = "No" ' Perform some action.
End If
End If
End If
End Sub

When I debug the code 'frmSuppliersInv.Show' is highlighted in yellow. Can anyone help me please?

Reply With Quote
  #2 (permalink)  
Old January 4th, 2006, 05:21 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts

Hi Fin

I tried to recreate the error, but couldn't. The code is working fine.


Reply With Quote
  #3 (permalink)  
Old January 4th, 2006, 05:26 AM
Friend of Wrox
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts

Can you hit the function key F8 until you encounter the error, the line that fails is highlightedto be highlighted in yellow. VBA automatically goes to the userform.show line if an error like this occurs, however, this is not the failing line.

I am guessing you have some code embedded in the userform initialize event that is failing rather than the statement that is calling it.



Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Msgbox rwalker ASP.NET 1.x and 2.0 Application Design 28 March 20th, 2008 01:23 PM
Msgbox Help darrenb Access VBA 2 June 8th, 2007 12:53 AM
MsgBox prabodh_mishra Pro VB 6 1 December 29th, 2006 11:51 AM
msgbox Ramakrishna.G General .NET 3 September 14th, 2004 02:17 AM
help with Msgbox helmekki Excel VBA 2 June 25th, 2004 08:24 AM

All times are GMT -4. The time now is 11:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.