+ Reply to Thread
Results 1 to 15 of 15

VBA application not working on stand alone computers

  1. #1
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Unhappy VBA application not working on stand alone computers

    I know I have had help so far with this application. It works perfectly on my laptop but not on other laptops using the same version of Excel. The error is associated with the two commandbuttons: using the first commandbutton results in,
    Please Login or Register  to view this content.
    Sub Clear_Form()

    For Each ctrl In Me.Controls
    Please Login or Register  to view this content.
    with sub line and ctrl being highlited
    While the second commandbutton results in:
    [CODE][/Private Sub UserForm_Terminate()
    TerminationMethod =
    CODE] with all this being highlighted.
    Sessions.xlsm
    I am at wits end.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    On the computers with the problem have you taken a look under Tools>References...?

    Is anything listed there marked as MISSING?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Thanks, Norie, I will check this out as soon as I can access the other computers.

  4. #4
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Norie, under tools there was nothing listed as missing. however, when I compiled the VBAProject on another computer, I had the message "object or library not found"

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    On the computer you received that message is there definitely nothing marked as MISSING under Tools>References...?

    Are the checked references on that computer the same as those on your laptop, or any other computer the code works on?

  6. #6
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Will check. They are at another location.

  7. #7
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    I did notice that when I was in the actual VBA coding screen that reference was greyed out but when I clicked on the userform reference was active

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    You are checking when in design mode without the userform loaded?

  9. #9
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Norie, thanks for pointing me in the right direction. I will blame my eyesight but there was a missing file in the reference block. on browsing from there I located the MSCOMCTL.ocx file and loaded it in, then moved it up to the correct position. The application works well on that system now. Now to do the same to the rest of the computers. Many thanks. - Tony

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    I thought that reference might be the problem, mind you I don't actually think you need it.

    MSCOMCTL.ocx is for the Microsoft Common Controls library which I believe contains the DTPicker control.

    You aren't using that control as you have the DatePicker class module which appears to be for some sort of 'custom' date picker.

    Anyway, when I uncheck MSCOMCTL.ocx everything, including the date picker, works fine.

    The reason you have it listed could be because at some point in the past you used the DTPicker control from MSCOMCTL.ocx.

    Hope that makes sense.

  11. #11
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Norie, you are right. I did use the datepicker control on an earlier version. I have loaded the control on one of the stand alone computers and now the program works perfectly. I was hoping to avoid using it as it now means that if they replace any computers they will need to load this control into the setup and I will not be around to remind them.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    You really don't need to do that.

    In the workbook there is a class module that implements a custom date picker.

    I removed the reference for MS Common Controls and everything worked fine.

  13. #13
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    Very good advice. I also unticked the control in tools>reference and it works as designed on all stand alone computers now. I am elated.

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: VBA application not working on stand alone computers

    Glad it worked.

    By the way, where did you get the code for the custom date picker?

  15. #15
    Registered User
    Join Date
    07-06-2015
    Location
    Tennant Creek
    MS-Off Ver
    2010
    Posts
    46

    Re: VBA application not working on stand alone computers

    I picked it up by roaming through this site and following leads

+ 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. ActiveX control not working on other computers
    By Ezzard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2015, 10:49 AM
  2. Stand Alone Application from Excel
    By samder68 in forum Excel General
    Replies: 3
    Last Post: 05-05-2014, 02:33 PM
  3. [SOLVED] Macro's not working on other computers (help please)
    By 4lowie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-15-2013, 09:33 PM
  4. [SOLVED] Calendar not Working on all Computers
    By Runnin L8 in forum Excel General
    Replies: 7
    Last Post: 12-04-2013, 08:25 PM
  5. Working from 2 computers
    By famdamly in forum Excel General
    Replies: 8
    Last Post: 02-25-2006, 07:23 PM
  6. How to distribute a workbook as a stand-alone application?
    By Paul Gallagher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-16-2005, 06:06 PM
  7. Working with templates on different computers
    By Don in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2005, 12:06 AM

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