+ Reply to Thread
Results 1 to 5 of 5

Help with saving from a cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-09-2005
    Location
    SC
    Posts
    196
    Thanks for the reply.

    I ran the code replacing: FileToSave = InputBox("Save the date for data history" & _
    " in the form month-day-year" & _
    " example: 10-13-2003", _
    "Name day to archive")


    With: FileToSave = Activeworkbook.Worksheets("HH1").Range("F2").Text and I got a Microsoft error, that it could not access a file needed.

    In the vba code, highlighted in yellow is: ActiveWorkbook.SaveAs Filename:=FileToSave, FileFormat:=xlNormal, Password:="", writerespassword:="SIC", _
    ReadOnlyRecommended:=False, CreateBackup:=False


    I want to name the new sheet with the current days date which is located on the original sheet in cell F2. Can I reference in the code the actual filename instead of "Activeworkbok".

    Thanks again,
    EMoe

  2. #2

    Re: Help with saving from a cell

    Hi
    How is the date formatted? - file names don't like "/" and some other
    characters in them. Also, what is the date format in the cell - that
    too might affect things. If you have a normal bit of text in F2 the
    code will work (assuming it did using the input box!), so I'm guessing
    you don't have a normal bit of text in F2.

    regards
    Paul


  3. #3
    Forum Contributor
    Join Date
    05-09-2005
    Location
    SC
    Posts
    196
    Thanks again Paul.

    You are absolutely right! I found that using this format 4/15/2006, did not work. However changing it to 4-15-2006, did the trick. So now the code looks in the designated sheet & cell, with the latter format, and she runs to the end.

    Thanks again!

    Regards,
    EMoe

+ 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