Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Puerto Rico
    Posts
    69

    Unhappy Unanswered: I know it might be a dumb question, but it has me going crazy!!!

    In excel there is thisworkbook object to refer to the open workbook. How I do that in access? How's the object called? I have all the code done but still trying to figure it out. Looked thru the forums but no luck. Thanx

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What exactly do you need it to do?

    How you call the current database is going to vary based on your needs.

  3. #3
    Join Date
    Aug 2003
    Posts
    68
    CurrentDB = Refers to indigenous DB
    jm

  4. #4
    Join Date
    May 2004
    Posts
    1

    Active form

    Try this

    ===============
    dim myFormName as string

    myFormName = Screen.ActiveForm


    =================

    This will turn the name of the active form currently in use

    If you want to reference the forms objects you will have to declare it first and use 'SET'

  5. #5
    Join Date
    Oct 2003
    Posts
    13
    Go to tools, reference and select Microsoft Excel xx Object Library
    - - - - -
    WorksheetName = "c:\myExcel.xls"
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Workbooks.Open strSourceFile
    Set objExcelWorksheet = objExcel.ActiveWorkbook.Sheets(WorksheetName)

    objExcelWorksheet.Cells(1, 1) Will then refer to Row1, Cell1

    - - - - - -
    Is this what you're looking for?

Posting Permissions

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