update newbie

C

Curt

Have a sheet (DATA) all info is entered here. Many userforms and modules.
Need to change some userforms and some modules. Two people are entering info
on (DATA) sheet. Have never done this before. How can I update thier copies
without affecting thier data entries? The sheet is in a folder with word.docs
that are used for mail merge. The sheet is called Parade when you open parade
you get to a data userform then go to next userform to get location you want
in program.
Searched thru and could not find any answers that addressed my problem. Or I
did not know what I was looking for.
Started this last Feburary. If not for this forum I would of been lost.
Thanks to All
 
J

Joel

I would copy the file with the data into your updated workbook with the
lastest version of the forms and macros. First delete all sheets in your
updated workbook and then copy the sheets with data into the file. Make
copies of both workbooks incase problems occur.

One worksheet will remain in your updated workbook because all sheets cannot
be revoed from a workbook. When you copy in the new worksheet there may be a
sheet that is the same name as the one that remained in your updated
workbook. this will have a (2) in the sheet name that needs to be changed.

Sub addworkbook()

'open old old workbook
oldwbkname = "c:\temp\book1.xls"

'delete all sheets in this workbook
'one sheet will remain
With ThisWorkbook
For Each ws In .Worksheets
If .Worksheets.Count > 1 Then
ws.Delete
End If
Next ws
End With

'open old old workbook
Workbooks.Open Filename:=oldwbkname
oldbookname = ActiveWorkbook.Name
With Workbooks(oldbookname)
For Each ws In .Worksheets
With ThisWorkbook
lastsheet = .Worksheets.Count
ws.Copy after:=.Worksheets(lastsheet)
End With
Next ws
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top