+ Reply to Thread
Results 1 to 5 of 5

Excel VBA Program stopped working

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Excel VBA Program stopped working

    Hi all this is my first post so please be gentle with me.

    I have an VBA in excel 2010 that I have been using for some time, it takes invoice details from one workbook and puts the details into another workbook.
    It has suddenly stopped working. Dim exApp As Excel.Workbook has "Nothing" when I hover over it. I think I have all the references installed.

    I am stuck.

    I am not a VBA programmer but a am a software engineer(PLC Programing) and write small utilities to help me.

    Can anybody help.

    It was working on windows Xp and windows 7. I am currently running windows 8 pro, (official version). It stopped working in Windows 7. I did install office 2013 preview but I am now back with 2010.

    Cheers Clive

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Excel VBA Program stopped working

    Have you tried Application.Workbook as an alternative?

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Excel VBA Program stopped working

    The line:
    Please Login or Register  to view this content.
    should always show "Nothing" when you hover over exApp. All you've done with that code is declare a variable. You haven't set that variable to anything yet.

    You could use the code:
    Please Login or Register  to view this content.
    also.

    What do you mean by "stopped working"? Do you get an error message? Does the debugger pop up? If so, what row is highlighted?

    It would also be helpful for you to attach a sample workbook.

  4. #4
    Registered User
    Join Date
    10-19-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Excel VBA Program stopped working

    Sorry I did not give enough info.

    here is what happens see attached image.

    I added word to see if that worked ad it did its just Excel

    The error I get I type mismatch. The workbook "invoice calculator" is the workbook I have open.

    Cheers Clive
    Attached Images Attached Images

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Excel VBA Program stopped working

    Suggest declaring appEx as a workbook rather than an application.

+ 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