Consulting

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 22

Thread: VBA error

  1. #1
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location

    VBA error

    Dear All,
    I have written one tool in Excel 2003 by VBA.

    But when I use it in Excel 2010, the error show:



    After clicking OK button, another error show:



    So, I totally can not use this file.

    Anyone know how to settle this problem?

    Thanks,

    LVD

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Care to show us the wb or offending code at least?

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,443
    Location
    Sounds like you have a DLL problem, an old version. Tracking it down might be tricky. What do you have in References in the VBIDE?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Hi All,
    The error was shown even I have disable all marco.
    I have upload to Mediafire. Anyone help me.
    http://www.mediafire.com/?zpikremi4xqyw3w

    Thanks,

    LVD
    Ps: This file I have used for many years in Excel 2003.

  5. #5
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi LVD,

    You can post the file here. Below the Quick Reply box, press the <Go Advanced> button. In the new window, scroll down to <Manage Attachments>.

    Mark

  6. #6
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    ACK!

    PS - if it's over 1MB, zip it.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,443
    Location
    That file is 82 Mb. I can't imagine anyone opening an 82Mb file.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location

  9. #9
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Hi xld, GTO,
    As I have mention that this file I have used for long that's why it's big.
    If I continue using it in Excel 2003 SP3, everything is okay. But when I use it in Excel 2010 (even disable all macro) the error always shown when I open it.

    LVD

  10. #10
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Quote Originally Posted by xld
    Sounds like you have a DLL problem, an old version. Tracking it down might be tricky. What do you have in References in the VBIDE?
    As Bob has indicated,what references are used in the VBIDE? Its a sad but true fact that as Microsoft "improve" each version of Excel some things are left behind. In uploading a workbook try leaving out the data, so that we can see the VBA components,as this should reduce the workbook size.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  11. #11
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Quote Originally Posted by xld
    Sounds like you have a DLL problem, an old version. Tracking it down might be tricky. What do you have in References in the VBIDE?
    Here is the ref.:



    I think that because of some controls.
    I have tried to export all modules: --> Okay
    I have tried to export all forms: --> some forms can, some can not.

    LVD

  12. #12
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    Most of the solutions I've seen have involved registering DLLs.

    The most common DLL seems to be MSCOMCT2.OCX which is MS Windows Common Controls 6.0, which has the MonthView, DatePicker etc.

    You've got that reference selected but as has been suggested, perhaps you need to check the version.

  13. #13
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    Are you using 64bit Excel 2010? If so, the common controls are not compatible.
    Be as you wish to seem

  14. #14
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Quote Originally Posted by Aflatoon
    Are you using 64bit Excel 2010? If so, the common controls are not compatible.
    I use Excel 2010, 32bit.

    LVD

  15. #15
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Quote Originally Posted by Norie
    Most of the solutions I've seen have involved registering DLLs.

    The most common DLL seems to be MSCOMCT2.OCX which is MS Windows Common Controls 6.0, which has the MonthView, DatePicker etc.

    You've got that reference selected but as has been suggested, perhaps you need to check the version.
    I have installed two version on the pc (Excel 2003 & Excel 2010).
    I open in Excel 2003, it's ok. So, I don't think because of MSCOMCT2.OCX.

    Tks.

    LVD

  16. #16
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    Have you tried deleting all .exd files from your C drive with Excel closed, then opening in 2010? Also do you have another machine (Virtual or physical) that you may test it on with just Excel 2010 installed?
    Be as you wish to seem

  17. #17
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Quote Originally Posted by Aflatoon
    Have you tried deleting all .exd files from your C drive with Excel closed, then opening in 2010? Also do you have another machine (Virtual or physical) that you may test it on with just Excel 2010 installed?
    Hi Aflatoon,
    Yes, I have another PC that just install Excel 2010.
    But totally, I can not use this file (even disable all macro).

    LVD

  18. #18
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    I thought I might connect these two dots. Probably you have similar requirements so might benefit from the same end-solution.
    http://social.msdn.microsoft.com/For...f-a1ea9cdc33b9
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  19. #19
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    shrivallabha

    There doesn't seem to be a solution in that link.

    Is it in one of the related questions?

  20. #20
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    Norie, You are right. It is just that two people are facing similar problems so I thought it will help both OPs as in the end they may end up with similar solution.

    That said, I haven't have worked on Excel 2010 but I guess I read this somewhere (of course I could be wrong) that upto 2K7 versions it was VB6.0 and for 2K10 its VB7.0. Does it have any implications? Like Application.FileSearch which was good upto 2K3...
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •