+ Reply to Thread
Results 1 to 9 of 9

Macro migration from MS Office 2003 to 2010

  1. #1
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Unhappy Macro migration from MS Office 2003 to 2010

    Hello,

    I've migrated from Windows XP/Office 2003 to Windows Vista/Office 2010.

    Everything works fine exept of my old macros. They have beed programmed... probably at 1997? But they worked just fine, till now.

    I read on the web that it is because of some incompatibilities since Office 2007. But can you please tell me WHAT EXACTLY needs to be updated in my code?

    Attachment 321592

    Please Login or Register  to view this content.
    What I need is to scan folder C:\Mouse and there find .xls file (Mouse.xls) which will apear in ComboBox (via attached screenshot).

    Something wrong with .LookIn command?

    Thank you

    Vardenf

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro migration from MS Office 2003 to 2010

    I think application.filesearch isnt there anymore. not 100% though.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Macro migration from MS Office 2003 to 2010

    i tried clicking on the link for the attached file to see what's broken in it and i got an error...

    "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    don't worry, there's a lot of people that are far more confused than you
    but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro migration from MS Office 2003 to 2010

    Yes Applicatin.FileSearch was discounted in 2007. Use the Dir function or File System Object in the Scripting Runtime lib.

    This is uses the Dir function (untested). This is just an example. There's a good chance I missed something.
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  5. #5
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Macro migration from MS Office 2003 to 2010

    Here is the link for an attachement:


    http://postimg.org/image/k5oho244v/

    Thank you

  6. #6
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Macro migration from MS Office 2003 to 2010

    Hello,

    thank you very much, with little changes it works, BUT the next problem occured:

    Please Login or Register  to view this content.
    Now, after successful file-search it apeared in the ComboBox. Now, when I select this file, following question appears:

    Imput data are in file Mouse.xls?

    Attachment 321906

    After click Yes it should open file and check data version:

    Attachment 321910

    BUT instead of that it doesn't open the file but following error appears:

    Error during opening file number 1004. Can not continue! Call autor of the aplication.

    Attachment 321908

    Only one workaroud I found is:

    1) Open document with this code (cheese.xls), DO NOT run macro yet, let document opened
    2) Open Mouse.xls -> Save As -> Rewrite original Mouse file, close Mouse.xls document
    3) Run macro on cheese.xls
    This way it works, BUT I have to do this everytime I open cheese.xls!

    What's wrong with this 1004 error?


    Thank you for help
    Last edited by Vardenf; 05-30-2014 at 10:03 AM.

  7. #7
    Registered User
    Join Date
    05-29-2014
    Posts
    5

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro migration from MS Office 2003 to 2010

    Your attachments are not valid.

    Images are not very useful.

    I don't know what your "Open file" code looks like.

  9. #9
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: Macro migration from MS Office 2003 to 2010

    Hello,

    here is code where error window appears:

    Please Login or Register  to view this content.
    I guess, is it again because of MS Office 2007< changes?


    Thank you verry much

+ 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. Analyst with MS Office 2003 and 2010 experience.
    By carlzilla in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 09-14-2012, 04:03 AM
  2. [SOLVED] Sorting Macro From Office 2010 In Office 2003
    By splendidus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2012, 04:55 AM
  3. Migration vba excel from win to mac office 2011
    By felisida in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2012, 07:20 AM
  4. Opening PPT from Excel VBA- Office 2003 and 2010 Installed
    By mlexcelhelpforum in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-16-2011, 09:02 AM
  5. macro built with Office 2003 not working on Office 2007
    By pako87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2009, 08:12 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