How to update data on a Userform from a file

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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!
 

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.
 

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:
 

Attachments

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top