Results 1 to 4 of 4

Thread: Advice

  1. #1
    Join Date
    Aug 2003
    Posts
    39

    Unanswered: Advice

    Any advice on how to:

    Open Excel and save it with a name based on a control is a specific folder. I think you can simply do it through a RunApp macro but it is not working for me.

    RunApp:

    Control Line: c:\Program Files\Microsoft Office\Office\excel.exe "J:\Finance\FINACCT\General Accounting\GA Datawarehouse\Account Reconciliation Backups\" & Forms![test]![txttest]

  2. #2
    Join Date
    Jul 2003
    Posts
    81

    Thumbs up Re: Advice

    Check the docmd.outputto method.

  3. #3
    Join Date
    Aug 2003
    Posts
    39

    Re: Advice

    Originally posted by M@sterm!nd
    Check the docmd.outputto method.
    I dont want to Output anything though. I just want to open a blank Excel Workbook for users to perform various calculations regarding the accounts they are looking at.

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941

    Re: Advice

    Originally posted by wauger20
    I dont want to Output anything though. I just want to open a blank Excel Workbook for users to perform various calculations regarding the accounts they are looking at.
    This should do it....

    Sub CreateWorkBook()
    Dim ObjXL_APP As Excel.Application, ObjXL_BOOK As Excel.Workbook, strFileName As String
    strFileName = "C:\Newbook.xls"
    Set ObjXL_BOOK = GetObject(strFileName, "excel.sheet")
    Set ObjXL_APP = ObjXL_BOOK.Parent
    ObjXL_APP.Visible = True
    ObjXL_BOOK.Windows(1).Visible = True
    End Sub

    Just insert the name of your work book in strFileName
    Inspiration Through Fermentation

Posting Permissions

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