+ Reply to Thread
Results 1 to 13 of 13

Run-Time error "70" Permission Denied

Hybrid View

  1. #1
    Audrey
    Guest

    Run-Time error "70" Permission Denied

    I've got a macro on a spreadsheet that launches a form but the form wont
    open. It has worked for me in the past. I made some minor changes to the
    form and the code but now it wont open. When I click on debug here is where
    it points...

    Sub Button2_Click()
    UserForm2.Show this is yellow
    End Sub

    Any suggestions? I really appreciate your help!!!


  2. #2
    Jim Thomlinson
    Guest

    RE: Run-Time error "70" Permission Denied

    There is nothing on this line that should cause a problem. Place your cursor
    on this line a press F8. This will run your code one line at a time. Keep
    pressing F8 until the error message appears. I am guessing that the actual
    error might be in a form intialize or form activate event. Give it a try and
    let us know how it went...

    HTH

    "Audrey" wrote:

    > I've got a macro on a spreadsheet that launches a form but the form wont
    > open. It has worked for me in the past. I made some minor changes to the
    > form and the code but now it wont open. When I click on debug here is where
    > it points...
    >
    > Sub Button2_Click()
    > UserForm2.Show this is yellow
    > End Sub
    >
    > Any suggestions? I really appreciate your help!!!
    >


  3. #3
    Audrey
    Guest

    RE: Run-Time error "70" Permission Denied

    When I press F8 it tries to save.

    "Jim Thomlinson" wrote:

    > There is nothing on this line that should cause a problem. Place your cursor
    > on this line a press F8. This will run your code one line at a time. Keep
    > pressing F8 until the error message appears. I am guessing that the actual
    > error might be in a form intialize or form activate event. Give it a try and
    > let us know how it went...
    >
    > HTH
    >
    > "Audrey" wrote:
    >
    > > I've got a macro on a spreadsheet that launches a form but the form wont
    > > open. It has worked for me in the past. I made some minor changes to the
    > > form and the code but now it wont open. When I click on debug here is where
    > > it points...
    > >
    > > Sub Button2_Click()
    > > UserForm2.Show this is yellow
    > > End Sub
    > >
    > > Any suggestions? I really appreciate your help!!!
    > >


  4. #4
    Jim Thomlinson
    Guest

    RE: Run-Time error "70" Permission Denied

    Lets try this from a different angle. In the code window, place your cursor
    on the userform2.show line. Hit F9. The line should now be Dark Red. This is
    a break point. (When we have figured out what is wrong we can remove the
    break point in the exact same way as we placed it in the first place.) Now go
    back to excel and press the command button. The code will stop on this break
    point. Now hit F8. Keep hitting F8 until an error message appears. Let me
    know how it goes.

    HTH

    "Audrey" wrote:

    > When I press F8 it tries to save.
    >
    > "Jim Thomlinson" wrote:
    >
    > > There is nothing on this line that should cause a problem. Place your cursor
    > > on this line a press F8. This will run your code one line at a time. Keep
    > > pressing F8 until the error message appears. I am guessing that the actual
    > > error might be in a form intialize or form activate event. Give it a try and
    > > let us know how it went...
    > >
    > > HTH
    > >
    > > "Audrey" wrote:
    > >
    > > > I've got a macro on a spreadsheet that launches a form but the form wont
    > > > open. It has worked for me in the past. I made some minor changes to the
    > > > form and the code but now it wont open. When I click on debug here is where
    > > > it points...
    > > >
    > > > Sub Button2_Click()
    > > > UserForm2.Show this is yellow
    > > > End Sub
    > > >
    > > > Any suggestions? I really appreciate your help!!!
    > > >


  5. #5
    Audrey
    Guest

    RE: Run-Time error "70" Permission Denied

    Our keyboards must not match. F9 is something else (I have XP). I added a
    "watch" and received the following information back...
    Expression: UserForm2
    Value: <Object variable or With block variable not set>
    Type: UserForm2
    Context: Module1.Button2_Click

    "Jim Thomlinson" wrote:

    > Lets try this from a different angle. In the code window, place your cursor
    > on the userform2.show line. Hit F9. The line should now be Dark Red. This is
    > a break point. (When we have figured out what is wrong we can remove the
    > break point in the exact same way as we placed it in the first place.) Now go
    > back to excel and press the command button. The code will stop on this break
    > point. Now hit F8. Keep hitting F8 until an error message appears. Let me
    > know how it goes.
    >
    > HTH
    >
    > "Audrey" wrote:
    >
    > > When I press F8 it tries to save.
    > >
    > > "Jim Thomlinson" wrote:
    > >
    > > > There is nothing on this line that should cause a problem. Place your cursor
    > > > on this line a press F8. This will run your code one line at a time. Keep
    > > > pressing F8 until the error message appears. I am guessing that the actual
    > > > error might be in a form intialize or form activate event. Give it a try and
    > > > let us know how it went...
    > > >
    > > > HTH
    > > >
    > > > "Audrey" wrote:
    > > >
    > > > > I've got a macro on a spreadsheet that launches a form but the form wont
    > > > > open. It has worked for me in the past. I made some minor changes to the
    > > > > form and the code but now it wont open. When I click on debug here is where
    > > > > it points...
    > > > >
    > > > > Sub Button2_Click()
    > > > > UserForm2.Show this is yellow
    > > > > End Sub
    > > > >
    > > > > Any suggestions? I really appreciate your help!!!
    > > > >


  6. #6
    Jim Thomlinson
    Guest

    RE: Run-Time error "70" Permission Denied

    Here is a silly question. Do you have a userform2. In the project window you
    will see the Excel sheets, the forms and the modules. Under forms is there a
    UserForm2?

    "Audrey" wrote:

    > Our keyboards must not match. F9 is something else (I have XP). I added a
    > "watch" and received the following information back...
    > Expression: UserForm2
    > Value: <Object variable or With block variable not set>
    > Type: UserForm2
    > Context: Module1.Button2_Click
    >
    > "Jim Thomlinson" wrote:
    >
    > > Lets try this from a different angle. In the code window, place your cursor
    > > on the userform2.show line. Hit F9. The line should now be Dark Red. This is
    > > a break point. (When we have figured out what is wrong we can remove the
    > > break point in the exact same way as we placed it in the first place.) Now go
    > > back to excel and press the command button. The code will stop on this break
    > > point. Now hit F8. Keep hitting F8 until an error message appears. Let me
    > > know how it goes.
    > >
    > > HTH
    > >
    > > "Audrey" wrote:
    > >
    > > > When I press F8 it tries to save.
    > > >
    > > > "Jim Thomlinson" wrote:
    > > >
    > > > > There is nothing on this line that should cause a problem. Place your cursor
    > > > > on this line a press F8. This will run your code one line at a time. Keep
    > > > > pressing F8 until the error message appears. I am guessing that the actual
    > > > > error might be in a form intialize or form activate event. Give it a try and
    > > > > let us know how it went...
    > > > >
    > > > > HTH
    > > > >
    > > > > "Audrey" wrote:
    > > > >
    > > > > > I've got a macro on a spreadsheet that launches a form but the form wont
    > > > > > open. It has worked for me in the past. I made some minor changes to the
    > > > > > form and the code but now it wont open. When I click on debug here is where
    > > > > > it points...
    > > > > >
    > > > > > Sub Button2_Click()
    > > > > > UserForm2.Show this is yellow
    > > > > > End Sub
    > > > > >
    > > > > > Any suggestions? I really appreciate your help!!!
    > > > > >


+ 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