Graphs in userform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pengiliverpool
    New Member
    • Oct 2007
    • 9

    Graphs in userform

    i have an activex graph working in my user form, when i move the file to another directory the userform still works but the graph no longer updates it stays as the last instance.
    any ideas?
    help would be greatfully appreciated.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by pengiliverpool
    i have an activex graph working in my user form, when i move the file to another directory the userform still works but the graph no longer updates it stays as the last instance.
    any ideas?
    help would be greatfully appreciated.
    Have you checked the paths where the information is retrieved?, may be some paths aren't full names, so VB search them in the current file directory.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by pengiliverpool
      i have an activex graph working in my user form, when i move the file to another directory the userform still works but the graph no longer updates it stays as the last instance.
      any ideas?
      help would be greatfully appreciated.
      Can you give us some idea of the sort of environment we're talking about? For instance, the expression "user form" sounds as though it may relate to VBA in either Excel or Word?

      Comment

      • pengiliverpool
        New Member
        • Oct 2007
        • 9

        #4
        the vb is in excel, the data path does relate to current directory but there is a copy of the data there so everything is the same.

        Comment

        • kadghar
          Recognized Expert Top Contributor
          • Apr 2007
          • 1302

          #5
          Originally posted by pengiliverpool
          the vb is in excel, the data path does relate to current directory but there is a copy of the data there so everything is the same.
          Since you're working with VBA in Excel, the code should say something like

          activeworkbook. path & "\sourceFile.ex t"

          all you have to do is put the sourcefiles in the same dir as de activeworkbook (the excel file with the macro), ro rewrite that path:

          "c:\mypath\sour ceFile.ext"

          HTH

          Comment

          Working...