+ Reply to Thread
Results 1 to 6 of 6

Cannot get past Run-time 70, Permission Denied

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Cannot get past Run-time 70, Permission Denied

    Hi all,
    I just opened a file I was working on last night and when I stepped through the code, which is
    Please Login or Register  to view this content.
    I am now prompted with an error at the AddItem line telling me that my permission is denied, run-time 70. What's this about, any ideas?

    Regards:
    Last edited by Mordred; 07-09-2011 at 01:55 PM.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Cannot get past Run-time 70, Permission Denied

    See, this is what happens sometimes when one stays up waaay too late at night working. I'm trying to add items to a combo box change event! 'Geez, and I sat there this morning stumped by why the combo box was not populating.

    This still doesn't explain the lack of permission, or does it?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Cannot get past Run-time 70, Permission Denied

    Was the ListFillRange property of the combobox set at design time? If so, I think you're not going to be able to use the AddItem method.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Cannot get past Run-time 70, Permission Denied

    It looks like I did that at work yes. Thanks for that shg, what I did was a straight copy paste of the sheets to another workbook and now I can work with it again.

    Just to clarify then, if I set the ListFillRange properties before hand in the properties window and then try to change it with code, the properties window settings will trump the code?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Cannot get past Run-time 70, Permission Denied

    Conceptually, if the control has a fill range and you add an item, then the item would have to get added to the end of the range and the range adjusted accordingly (a lot to expect), or the fill range has to get converted to a list and the item added (also a lot to expect, IMO).

    You could do either of those in code, though.

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Cannot get past Run-time 70, Permission Denied

    Thanks shg, ideally, I would prefer to do it with code as I like to code. I'll just have to watch that I don't go crazy in the properties window for each object that I use.

+ 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