+ Reply to Thread
Results 1 to 6 of 6

SendKeys "{ENTER}" in Macro...............Permission denied

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    US
    MS-Off Ver
    Excel XP
    Posts
    3

    SendKeys "{ENTER}" in Macro...............Permission denied

    I've just put together a new Windows 8 PC to replace my Windows XP Home computer.

    After loading Office XP I've found that my macros containing SendKeys "{ENTER}" come to a screeching halt when that line is reached. The macros work fine otherwise.

    I get the message "Permission denied" when that line in the macro is reached.

    I've tried going to Excel.exe in File Explorer and changing permissions and security settings to suggestions I've found on the web to no avail.

    I've also read there could be some issues with newer versions of Visual Basic

    I'm logged in as an administrator on this single user desk top computer.

    I need to find a work around for this as it's a critical part of my spread sheet. It's worked just fine for years on the XP machine.

    Can anyone suggest an alternative to the SEND KEYS command or a way to get by this permissions problem?

    Code below:


    Sheets("COD").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("HALF ROUNDS").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("ELLIPTICALS").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("JAMBS").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("CROWNS").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("SPECIES").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("DRIP CAP").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete
    Sheets("INCH TO FOOT").Select
    SendKeys "{ENTER}"
    ActiveWindow.SelectedSheets.Delete

    Thanks,
    BH Davis

  2. #2
    Registered User
    Join Date
    04-30-2013
    Location
    US
    MS-Off Ver
    Excel XP
    Posts
    3

    Re: SendKeys "{ENTER}" in Macro...............Permission denied

    Found the solution. Just turned off DISPLAY ALERTS and got rid of the SendKeys commands.

    Thanks to Steve on another forum.

    BH

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: SendKeys "{ENTER}" in Macro...............Permission denied

    Take out all the SendKeys and use "DisplayAlerts=False"

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: SendKeys "{ENTER}" in Macro...............Permission denied

    Please note that if you cross-post you should post the links in your thread so as to not waste other people's time. See below.

    Before spending time on your question, they can check that you haven't already been given an answer ... as you have in this case.

    Regards, TMS



    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    US
    MS-Off Ver
    Excel XP
    Posts
    3

    Re: SendKeys "{ENTER}" in Macro...............Permission denied

    Actually I was in effect doing just that. I posted here and then posted on the other forum a little while later/ I got an immediate response before I even had a chance to get back here. I was typing out that the answer had been found as the good person here was typing out the same solution.

    I appreciate all your time and effort in participating in these forums and will indeed try to abide by all the rules.

    BH

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: SendKeys "{ENTER}" in Macro...............Permission denied

    Fair enough.

+ 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