ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   update newbie (https://www.excelbanter.com/excel-programming/398412-update-newbie.html)

Curt

update newbie
 
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

joel

update newbie
 
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

"Curt" wrote:

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



All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com