+ Reply to Thread
Results 1 to 3 of 3

Save as not working

  1. #1
    Registered User
    Join Date
    12-20-2005
    Posts
    41

    Save as not working

    Please I really need some help... Yesterday I made a post but I must not have explained the problem well enough.. no response.. let me try again.

    The code follows..(yesterdays did not include the beginning)

    When I first get turn on my computer in the morning the following code will fail at "save as".... If i create a manual dummy excel file and manually save it to the ftp sight... that save will work... then I can go back to the workbook that contains the macro and then it works just fine....

    I am running windows 2000 it had been run on a machine that is running xp with the same result.. and one machine with xp that it worked fine on..
    (It was written using excel 2000)

    I need any suggestion I can get... there is something here that I do not understand...

    ub SUBMIT()
    '
    ' SUBMIT Macro
    ' Macro recorded 12/27/2005 by Randy
    '

    '
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    Sheets("system order").Select
    Cells.Select
    Selection.Copy
    Workbooks.Add
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Sheets(Array("Sheet2", "Sheet3")).Select
    Sheets("Sheet2").Activate
    Application.CutCopyMode = False
    ActiveWindow.SelectedSheets.Delete
    Dim sStr As String
    sStr = "ftp://(this has the ftp address signon and passwork/"
    sStr = sStr & _
    ActiveWorkbook.Worksheets(1) _
    .Range("a2").Text
    sStr = sStr & "_"
    sStr = sStr & Format(Now, "mm-dd-yy_hh-mm")
    sStr = sStr & ".csv"
    ActiveWorkbook.SaveAs _
    Filename:=sStr, FileFormat:=xlCSV
    ActiveWorkbook.Close
    ActiveWorkbook.Close
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    End Sub

  2. #2
    Steve
    Guest

    Re: Save as not working

    Hi Randy

    Never saved to ftp:// before, but I thought I would be polite and reply

    Are you sure there is something in A2

    You seem to be missing a point (period if your in NC I suppose) in front of
    the Range("A2").Text line

    All the best


    "RANDY IN NC" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Please I really need some help... Yesterday I made a post but I must not
    > have explained the problem well enough.. no response.. let me try
    > again.
    >
    > The code follows..(yesterdays did not include the beginning)
    >
    > When I first get turn on my computer in the morning the following code
    > will fail at "save as".... If i create a manual dummy excel file and
    > manually save it to the ftp sight... that save will work... then I can
    > go back to the workbook that contains the macro and then it works just
    > fine....
    >
    > I am running windows 2000 it had been run on a machine that is running
    > xp with the same result.. and one machine with xp that it worked fine
    > on..
    > (It was written using excel 2000)
    >
    > I need any suggestion I can get... there is something here that I do
    > not understand...
    >
    > ub SUBMIT()
    > '
    > ' SUBMIT Macro
    > ' Macro recorded 12/27/2005 by Randy
    > '
    >
    > '
    > Application.DisplayAlerts = False
    > Application.ScreenUpdating = False
    > Sheets("system order").Select
    > Cells.Select
    > Selection.Copy
    > Workbooks.Add
    > Range("A1").Select
    > Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
    > SkipBlanks:= _
    > False, Transpose:=False
    > Sheets(Array("Sheet2", "Sheet3")).Select
    > Sheets("Sheet2").Activate
    > Application.CutCopyMode = False
    > ActiveWindow.SelectedSheets.Delete
    > Dim sStr As String
    > sStr = "ftp://(this has the ftp address signon and passwork/"
    > sStr = sStr & _
    > ActiveWorkbook.Worksheets(1) _
    > Range("a2").Text
    > sStr = sStr & "_"
    > sStr = sStr & Format(Now, "mm-dd-yy_hh-mm")
    > sStr = sStr & ".csv"
    > ActiveWorkbook.SaveAs _
    > Filename:=sStr, FileFormat:=xlCSV
    > ActiveWorkbook.Close
    > ActiveWorkbook.Close
    > Application.DisplayAlerts = True
    > Application.ScreenUpdating = True
    > End Sub
    >
    >
    > --
    > RANDY IN NC
    > ------------------------------------------------------------------------
    > RANDY IN NC's Profile:
    > http://www.excelforum.com/member.php...o&userid=29778
    > View this thread: http://www.excelforum.com/showthread...hreadid=511041
    >




  3. #3
    Registered User
    Join Date
    12-20-2005
    Posts
    41
    Thank you for your reply I do appriciate it... And yes there is something in "a2" and I guess it does not show up well in the copy I made for this post... but there is a point (period) preceeding the word "range" in that line.

    Thank you so much, any help is appriciated..



    Quote Originally Posted by Steve
    Hi Randy

    Never saved to ftp:// before, but I thought I would be polite and reply

    Are you sure there is something in A2

    You seem to be missing a point (period if your in NC I suppose) in front of
    the Range("A2").Text line

    All the best


    "RANDY IN NC" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Please I really need some help... Yesterday I made a post but I must not
    > have explained the problem well enough.. no response.. let me try
    > again.
    >
    > The code follows..(yesterdays did not include the beginning)
    >
    > When I first get turn on my computer in the morning the following code
    > will fail at "save as".... If i create a manual dummy excel file and
    > manually save it to the ftp sight... that save will work... then I can
    > go back to the workbook that contains the macro and then it works just
    > fine....
    >
    > I am running windows 2000 it had been run on a machine that is running
    > xp with the same result.. and one machine with xp that it worked fine
    > on..
    > (It was written using excel 2000)
    >
    > I need any suggestion I can get... there is something here that I do
    > not understand...
    >
    > ub SUBMIT()
    > '
    > ' SUBMIT Macro
    > ' Macro recorded 12/27/2005 by Randy
    > '
    >
    > '
    > Application.DisplayAlerts = False
    > Application.ScreenUpdating = False
    > Sheets("system order").Select
    > Cells.Select
    > Selection.Copy
    > Workbooks.Add
    > Range("A1").Select
    > Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
    > SkipBlanks:= _
    > False, Transpose:=False
    > Sheets(Array("Sheet2", "Sheet3")).Select
    > Sheets("Sheet2").Activate
    > Application.CutCopyMode = False
    > ActiveWindow.SelectedSheets.Delete
    > Dim sStr As String
    > sStr = "ftp://(this has the ftp address signon and passwork/"
    > sStr = sStr & _
    > ActiveWorkbook.Worksheets(1) _
    > Range("a2").Text
    > sStr = sStr & "_"
    > sStr = sStr & Format(Now, "mm-dd-yy_hh-mm")
    > sStr = sStr & ".csv"
    > ActiveWorkbook.SaveAs _
    > Filename:=sStr, FileFormat:=xlCSV
    > ActiveWorkbook.Close
    > ActiveWorkbook.Close
    > Application.DisplayAlerts = True
    > Application.ScreenUpdating = True
    > End Sub
    >
    >
    > --
    > RANDY IN NC
    > ------------------------------------------------------------------------
    > RANDY IN NC's Profile:
    > http://www.excelforum.com/member.php...o&userid=29778
    > View this thread: http://www.excelforum.com/showthread...hreadid=511041
    >

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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