Is it Me!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Codebug
    New Member
    • Feb 2008
    • 25

    Is it Me!

    Trying to set the Source Document for an Excel Object on a form, does not load the document.

    ie

    Dim Filename AS String
    Filename = "c:\myfolder\te st.xls"

    CostSheet.Sourc eDoc = Filename


    also how can I stop an error if the SourceDoc file or path is not valid


    ps. what is Me! or Me.


    often seen it in examples but cant find it in the help file or recources anywhere
    Last edited by Codebug; Feb 15 '08, 08:52 AM. Reason: Typo
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    Me refers to the control that the code block belongs too

    for example in the Form_Load event for a form called frmForm1
    Me is an alias for frmForm1

    so in the context of the above example

    Me.Refresh
    and
    frmForm1.Refres h

    are different ways of saying the same thing

    Comment

    • Delerna
      Recognized Expert Top Contributor
      • Jan 2008
      • 1134

      #3
      as for the other, try doing a me.refresh after you set the source file
      That may fix your problem.

      Comment

      • Codebug
        New Member
        • Feb 2008
        • 25

        #4
        Thanks, its clear now

        Comment

        Working...