1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How to update data on a Userform from a file

Discussion in 'Software Development' started by VBnewbie, Apr 2, 2008.

Thread Status:
Not open for further replies.
  1. VBnewbie

    VBnewbie Thread Starter

    Joined:
    Apr 1, 2008
    Messages:
    2
    HI, I am fairly new to VB and way over my head in problems. Most urgent one at the moment is with displaying current data in a Userform that I created. I use VB to open a data.xlt file (which, as a template, should have the boxes all blanked out). VB actually saves the .tplt file to a data.xls file, and the UserForm uses "controlsource" to pull the current value from data.xls. That works just fine. I created a button "Modify Saved Data" and the goal was to be able to open an existing file, rename it data.xls (I found kill, so I can close data.xls and then deletes data.xls. Then I open the desired_file.xls, do an activeworkbook.saveas data.xls). However, I can't seem to make the Userform pick up the newly changed values - data.xls is open, but the userform is picking up the values from the original (the template). I've tried Load frmBasicData, I tried application.calculate and I tried a few things that I didn't really expect would work (and they didn't). What I was looking for was something that I would have called frmBasicData.Update.

    Is this enough to get help or should I post my form and my code? Thanks!
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Vbnewbie, I have asked the Forum moderators to move this thread to the Program Development forum where all the VB programmers are.
    Please do not create a new thread on there, it is against Forum rules, they will move it for you.
     
  3. VBnewbie

    VBnewbie Thread Starter

    Joined:
    Apr 1, 2008
    Messages:
    2
    Hi again....I created a sample program that shows the problem I'm having. I hardcoded it to live on c:\test\magic so if you put it somewhere else you'll have to change the Public Const msMasterSubVol (in module1) to point to your location.

    Hopefully with the sample someone's interest will get tweaked, I can't belieive it's that unique of a problem. Any suggestions (like get a new career???!!!) appreciated. :confused:
     

    Attached Files:

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/699460

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice