Results 1 to 2 of 2

Thread: auto saving an excel data base

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    uk
    Posts
    1

    Question auto saving an excel data base

    Can anyone help!

    1)I want to automaticaly save a live excel workbook,
    2)using the date and time as the save address
    3)The iput to save the file will come from a plc input into the excel file i.e. i will put a 1 in cell A1
    4)when their is a 1 in A1 i want vba to Auto save the file,
    5)I will remove the 1 using plc control which iunderstand alot more than VBA

    your help is appreciated!

  2. #2
    Addicted Member Supester's Avatar
    Join Date
    Nov 2001
    Location
    The Netherlands
    Posts
    220
    This is how you save a file in XL VBA (created with a macro)

    Code:
        ActiveWorkbook.SaveAs Filename:="C:\Work\temp\Book2.xls", FileFormat:= _
            xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
            , CreateBackup:=False
    You can reference a cell using the range object

    Code:
        ActiveWorkBook.Sheets("Sheet1").range("A1")
    Hope this helps a bit.

    btw....what do you mean by AutoSave?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width