+ Reply to Thread
Results 1 to 2 of 2

Keyboard shortcuts, interfering modules, errors, inconsistant behavior

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2000
    Posts
    25

    Keyboard shortcuts, interfering modules, errors, inconsistant behavior

    Things were working so well. Greg M. was helping me with the last bit of trouble I was having Friday and I was expecting to be finished this morning. Now everything has gone belly up.

    For starters, keyboard shortcuts have stopped working. I was able to run the macros manually for a while but then that stopped working too. I may also have the different modules interfering with each other. All I can think of to do is show what I have, so here goes.

    Microsoft Excel 2000 (I can have whatever flavor I like but I've been hesitant to have IT change it).
    Windows 2000 Professional (Same as above).


    I have a module named Formulas. It was written by someone who knows what they are doing and it is full of mathy sciency stuff. It looks something like this but with all the important stuff left out:
    Please Login or Register  to view this content.
    There are a lot of formulas in here and I generally don't have any problem with them. To use them, I type the name of the function and some parameters into the cell that is going to display the answer. Works in any cell in any sheet and calculates automatically.

    Apo helped me with the module below. I also pasted some script from the internet to stop and start background processes to make things run faster. I probably did not apply this in the best way or in the right place but it's there.
    Please Login or Register  to view this content.
    And finally, Greg M helped me in this thread and gave me this:
    Please Login or Register  to view this content.
    This module copies the worksheet and replaces some of the cell formulas with cell values.

    Maybe I am having big picture problems. Sub, function, private, public? I am not good at knowing when to use which. And the keyboard shortcut problem has me baffled. Hopefully it is something simple that an experienced eye can point out easily.

    Edit: Sorry, I know this is bad form. Spent so much time on this that I forgot to point out the problems. This is copied and pasted from my last response to Greg M:

    I'm having trouble testing anything today. Keyboard shortcuts seemed to have stopped working. The macros seem to work okay if I run them directly but sometimes I get errors. The errors are not consistent either. Sometimes I get an error and sometimes I don't.

    As of right now, whatever script I run errs during the copy worksheet part (Method 'Copy' of object '_Worksheet' failed). Aaaaaaannnnnnd Excel just crashed.

    Earlier, I was able to get through the copy part but then get an error on this line:
    [Select Code] copy to clipboard

    wksNewSheet.Range(sRANGE_NAME).Value = wksTemplate.Range(sRANGE_NAME).Value

    When stepping in I get: Compile Error: Method or data member not found. The first line, "Sub CopyTemplateWorksheet() is highlighted in yellow but The ".Range" in the last line of code is highlighted in blue.

    I have two other modules that might be contributing to my problems. I think I may need to start a new thread just to show the big picture.
    Last edited by ozizushi; 01-20-2014 at 07:44 PM.

  2. #2
    Registered User
    Join Date
    04-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: Keyboard shortcuts, interfering modules, errors, inconsistant behavior

    Yeah, this was a crazy post. There was no helping me at this point.

    The keyboard shortcuts stopped working because I had made the module name the same as the sub name. I changed the module name and the keyboard shortcuts work now. The rest of my problems were solved with some clean up and correct placement of code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Keyboard shortcuts in VBA
    By Yukio in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2013, 07:56 AM
  2. keyboard shortcuts
    By bobhope24 in forum Excel General
    Replies: 1
    Last Post: 08-13-2008, 10:51 AM
  3. Inconsistant Behavior using a UserForm
    By vivictis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2008, 03:50 PM
  4. Replies: 1
    Last Post: 02-08-2007, 10:57 AM
  5. Keyboard Shortcuts
    By Conan Kelly in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2006, 02:10 PM

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