+ Reply to Thread
Results 1 to 4 of 4

Macro not recording moving from 1 workbook to another

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2011 mac
    Posts
    44

    Macro not recording moving from 1 workbook to another

    1
    I am wanting to clear the contents of a .csv file, move to a .xlsm workbook to sort data prior to copy/ paste special (values + transpose) onto the blank .csv.

    After recording spreadsheet on running it, it stops because it hasn't recorded the move from the .csv to the .xslm. VBA below. This only became a problem after upgrading from Mac MS Office/Excel 2011 to 2021.

    Is there something wrong with my application or am I missing something?

    VBA:
    Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    Workbooks.OpenText FileName:= _
    "/Users/stephen/Documents/Publications/2023 t_delay/delay.csv", Origin:=65001 _
    , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
    ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=True, _
    Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array( _
    3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10 _
    , 1), Array(11, 1), Array(12, 1), Array(13, 1), Array(14, 1), Array(15, 1), Array(16, 1), _
    Array(17, 1), Array(18, 1), Array(19, 1), Array(20, 1)), TrailingMinusNumbers:=True
    Cells.Select
    Selection.ClearContents
    Range("A1").Select

    [[Here the macro should have recorded moving from .csv to .xslm. It therefore stalls at the next line because it can't find the named sheet]]

    Sheets("Var lists").Select
    Columns("G:G").Select

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

    Arrow Re: Macro not recording moving from 1 workbook to another


    Quote Originally Posted by tays01s View Post
    I am wanting to clear the contents of a .csv file, move to a .xlsm workbook to sort data prior to copy/ paste special (values + transpose) onto the blank .csv.
    Not need to clear a csv text file, very useless ! Just overwrite it via SaveAs …

  3. #3
    Registered User
    Join Date
    05-08-2013
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2011 mac
    Posts
    44

    Re: Macro not recording moving from 1 workbook to another

    I've previously found it useful to ensure no old data remain.

    However, that wasn't the problem. It's Excel's failure to record moving from 1 workbook to another.

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

    Re: Macro not recording moving from 1 workbook to another


    Moving ? As it is useless just restart with the Macro Recorder only from the data workbook
    in order to directly save - overwrite - the csv text file …
    For more help if necessary attach the source data workbook and the exact expected result csv text file with your best elaboration.

+ 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] Moving a worksheet to another workbook using a macro
    By JNEWMAN in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2019, 10:38 AM
  2. Personal Macro Workbook not Recording
    By kocumna in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2018, 05:16 PM
  3. problem with the macro after moving to another workbook
    By mkset in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2018, 06:31 AM
  4. Macro Recording to work in an active workbook
    By danallamas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2015, 10:34 PM
  5. [SOLVED] Moving and Recording Object Positions
    By primed in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-20-2013, 12:17 PM
  6. [SOLVED] moving a macro to a new workbook
    By KARomain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-04-2006, 04:10 PM
  7. [SOLVED] personal macro workbook must stay open for recording
    By Matthew Dodds in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2005, 01:35 PM

Tags for this Thread

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