+ Reply to Thread
Results 1 to 13 of 13

VBA Script has stopped working

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    VBA Script has stopped working

    HI

    I am using the following script which I found on the net but it seems to have stopped working. The workbook contains 52 spreadsheets and I have put this script on each one. It turns whatever is entered into capitals, we when it was working it did anyway.
    Please Login or Register  to view this content.
    Any help would be apreciated.
    Last edited by JosephP; 03-12-2013 at 12:26 PM. Reason: add code tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA Script has stopped working

    Your code works on my excel 2010, you can tray with
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Script has stopped working

    if you change cells in a change event you must disable events and you ought to loop in case more than one cell is changed
    Please Login or Register  to view this content.
    also note that formula cells do not trigger a change event anyway except when the formula is first entered into the cell
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    Replaced the first line with the other one and it made no difference when I type lowercase and press return it stays in lowercase

  5. #5
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    Changed the script still doing the same thing, only seems to effect the one workbook as I am using it sucessfully on another one?

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Script has stopped working

    then there must be some code in the workbook that disables events-run this
    Please Login or Register  to view this content.
    and then check if the lower to upper conversion works

  7. #7
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    Do I put them one after the other on each worksheet?

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Script has stopped working

    no-you only have to run that last code once now. if the change code works properly afterward it means that there is some other code in your workbook that is disabling events and you'll have to find and correct that

  9. #9
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    I pasted the second code into the workbook page of Microsoft Visual Basic and ran it by clicking on run then on the run sub button that came up.

    I then pasted the first code into the worksheet page of Microsoft Visual Basic and clicked on debug and then on compile.

    It works again, many thanks.

    Do I just need to paste the first code against each of the other worksheets?

    As an extra question if someone else opens this spreadsheet on their machine, enters data on it, saves it, closes it and then I open it again on my machine will this effect the code?

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Script has stopped working

    again, no-you only need to run the code once to reset events. everything should just work after that

    the code should not be affected by others using the file

  11. #11
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    This script is causing the date to appear in the American format of mm/dd/yyyy and when I copy the date cell down it adds 1 to the year instead of the day.

    Any ideas?

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Script has stopped working

    you should skip dates and numbers
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-12-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Script has stopped working

    Many thanks JosephP.

+ 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