CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    4

    Question: common Dialog Box error.



    Greetings.


    I wrote this file open Dialog in VB 4, and it did work, however it seems to have Broke, and i was wondering what went wrong??? maybe someone can help.


    this code did not break until i upgraded to VB 5.0. now i get the Error Method or data member not found.


    i dont want to have to rewrite my app in VB 5.0 from scratch, can someone help direct me in the correct path... thanks.



    Sub FOpenProc()

    Dim RetVal

    On Error Resume Next

    Dim OpenFileName As String

    frmMDI.CMDialog1.Filename = ""

    frmMDI.CMDialog1.ShowOpen

    If Err 32755 Then ' User chose Cancel.

    OpenFileName = frmMDI.CMDialog1.Filename

    ' If the file is larger than 65K, it can't

    ' be opened, so cancel the operation.

    If FileLen(OpenFileName) > 65000 Then

    MsgBox "The file is too large to open."

    Exit Sub


    it is this line : frmMDI.CMDialog1.Filename = "" in the code that is causing the problem,,,, according to VB. but it may be anywhere in VB. this is the file, open box. nothing spectaculer here. im just at a loss.

  2. #2
    Join Date
    Feb 2002
    Location
    India, Maharashtra
    Posts
    19

    Re: Question: common Dialog Box error.

    Hi,
    Just make sure that u have not changes the name of MDIfoem or Common Dialog Control, The Error which u have listed occures only when u have used wrong nwme of the variable or that method or property u have used is not valid.... in ur case the first case is happeneing
    so just check the names of variables

    Regards
    Satish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured