+ Reply to Thread
Results 1 to 9 of 9

RunTime error with UserForm!.Show

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    RunTime error with UserForm!.Show

    Dear Forum Members
    I have a userform with a commandbutton to open a second UserForm
    Please Login or Register  to view this content.
    This was working normaly till this morning when I got the following message
    Run Time Error 70
    Permission denied.
    The suggestions in the help files don't seem relevant so I am stuck. The application files are all on my local disc so I don't think network permissions are involved. Can any one point me in the right direction?
    Thanks
    John

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: RunTime error with UserForm!.Show

    That is not the problem.
    The UserForm is the problem. Lets see the userform code.
    Chances are you are trying populate a control two ways.

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: RunTime error with UserForm!.Show

    Davesexcel,
    I was changing the way I populated a Listbox so it is possible I didn't remove the old way. I will check this out and either change the post to solved or come back with the userform coding.
    Thanks for your help
    John

  4. #4
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: RunTime error with UserForm!.Show

    Davesexcell,
    This is the code for the userform throwing the error message
    Please Login or Register  to view this content.
    I have checked and can find no sign of th earlier code I used to populate ListBox1

    I hope this helps to pin point the problem
    John

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: RunTime error with UserForm!.Show

    Could you have used the properties window?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: RunTime error with UserForm!.Show

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!


    Have you renamed CommandButtons from CommandButton2 to CB2?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: RunTime error with UserForm!.Show

    You can get the Err #70 Permission denied when trying to set the list property of a listbox that already has the Rowsource property set.
    Cheers
    Andy
    www.andypope.info

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: RunTime error with UserForm!.Show

    I fear that the userform's codename that contains the button to open the second userform is identical to the userform's codename you want to open with the button.

    Please Login or Register  to view this content.
    I'd prefer to call a second userform (if fantasy is lacking) userform2



  9. #9
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: RunTime error with UserForm!.Show

    DavesExcel,RoyUK,AndyPope,snb et al

    Thanks for your help, you got there for me! I had the RowSource property set to a range and also set the value in code in the userform_initialise proceedure.

    Its working properly now, many thanks
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1