+ Reply to Thread
Results 1 to 2 of 2

Adjust code to fit a Mac computer

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Adjust code to fit a Mac computer

    Change for a Mac computer. Hello. I have this formula and it just stops because I have a Mac computer and not a windows. How can I adjust?

    Option Explicit

    Sub Update()
    Application.ScreenUpdating = False

    Dim countdate, cConnection, curDate, curPath, curColumn, lastRow

    Sheets("Impressions").Activate
    Cells(1, 1).Select
    Range(Selection, Selection.End(xlToRight)).Select

    countdate = Selection.Columns.Count
    curColumn = 5
    lastRow = Cells(Rows.Count, "A").End(xlUp).Row
    While curColumn <= countdate

    curDate = Format(Cells(1, curColumn).Value, "M-D-YY")
    curPath = ThisWorkbook.Path & "\Date_File\BusinessReport-" & curDate & ".csv"




    If Dir(curPath) <> "" Then

    cConnection = "TEXT;" & curPath
    'cConnection = "TEXT;D:\Win10\Desktop\New folder\Date_File\BusinessReport-1-9-18.csv",

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,636

    Re: Adjust code to fit a Mac computer

    1)
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    2) Try
    Hit Ctrl + H (Replace)
    enter what box : \
    enter replacement box : "& application.pathseparator & "

    should replace all \.

+ 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. Code running on one computer but not on another
    By Aaron092 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2015, 03:57 AM
  2. Code not working on another computer
    By rchure in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2014, 05:18 AM
  3. VBA code won't run on Mac computer.
    By Galvax in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 03-20-2014, 01:01 PM
  4. VBA code won't run on Mac computer.
    By Galvax in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2014, 01:01 PM
  5. Auto Adjust VBA Code
    By skankingpigeon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2012, 04:31 PM
  6. VBA code crashes on a different computer
    By dudamel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2010, 08:45 PM
  7. My code does not run on another computer
    By Pedro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2005, 01:05 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