+ Reply to Thread
Results 1 to 9 of 9

2004 macro won't run on 2011

  1. #1
    Registered User
    Join Date
    07-31-2014
    Location
    Newcastle, England
    MS-Off Ver
    2011 Mac
    Posts
    6

    2004 macro won't run on 2011

    Hi

    I'm new to this forum. I have a macro that works perfectly on excel for Mac 2004 but has errors on 2011.

    This bit of code fails and the debugger highlights the line I've marked with an @ symbol :-

    The error message prior to clicking the debug button is :-

    Run time Error '1004'

    A Range is required.Select at least one cell within arange and try again.

    Any help would be much appreciated


    Sub phoneordernoVAT()
    '
    ' phoneordernoVAT Macro
    ' copies no VAT rows from sheet: phoneorderall and pastes into sheet: phoneordernoVAT
    '

    '
    Sheets("phoneorderall").Select
    Selection.AutoFilter @
    Selection.AutoFilter Field:=6
    Selection.AutoFilter Field:=6, Criteria1:="=0", Operator:=xlAnd
    Cells.Select
    Selection.Copy
    Sheets.Add
    Sheets("Sheet9").Name = "phoneordernoVAT"
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End Sub

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: 2004 macro won't run on 2011


    Hi !

    According to forum rules, edit your post and use code tags ‼

    And here is the PC forum, you should move to the Mac forum …

  3. #3
    Registered User
    Join Date
    02-22-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: 2004 macro won't run on 2011

    You will have to leave the excel file as a .xls when opening it with office 2010. There are subtle differences between the vba code between office 2003 and 2010.

    I have had the same problem when i converted my .xls files to .xlsm and tried to run them in 2010 they did not work. When i left them as .xls they were fine!

    James

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: 2004 macro won't run on 2011


    I still use 2003 version and at least 95% of my codes work on later versions …

  5. #5
    Registered User
    Join Date
    02-22-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: 2004 macro won't run on 2011

    what is the extension of the file that you are having the issue with?

  6. #6
    Registered User
    Join Date
    07-31-2014
    Location
    Newcastle, England
    MS-Off Ver
    2011 Mac
    Posts
    6

    Re: 2004 macro won't run on 2011

    Thanks for the replies !

    I've tried leaving the file ext's as xls and also tried saving them as 2011 docs.

    Marc L can you let me know what you mean by post tags ?

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: 2004 macro won't run on 2011


    Use # icon …

  8. #8
    Registered User
    Join Date
    07-31-2014
    Location
    Newcastle, England
    MS-Off Ver
    2011 Mac
    Posts
    6

    Re: 2004 macro won't run on 2011

    Ok thanks

    Is that ok now below ?

    Should I create a new thread on the Mac forum ?

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-31-2014
    Location
    Newcastle, England
    MS-Off Ver
    2011 Mac
    Posts
    6

    Re: 2004 macro won't run on 2011

    Have to go out now for the evening so if anone replies I'll respond tomorrow

+ 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. [SOLVED] Macro/vba to change date format from 01.01.2011 to 01/01/2011
    By Darrenh1238 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2012, 07:42 PM
  2. Not all worksheet tabs showing up in Excel 2011 for Mac, they do in 2004
    By salrdav in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 09-22-2012, 11:14 PM
  3. 2004 macro will not function in 2011.
    By Butehawk in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 09-09-2012, 03:32 PM
  4. Replies: 0
    Last Post: 07-26-2011, 10:42 AM
  5. macro fror 2004 not working in 2011 for mac
    By Butehawk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-01-2010, 06:12 PM

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