Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying worksheets
If you look up 'Features that are unavailable in shared workbooks' you will
see that shared workbooks are pretty restricted, add the fact that shared workbooks are bug-ridden and don't work well, then I would suggest you come up with an alternative. Why not just have a template workbook and use process to control it, open the template first time, and save it as a new workbook with initials. Make it read only. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Dave Shaw" wrote in message ... I have some code to detect if a person has used the system before and if not copies a template worksheet and renames it with their initials. It works fine in a normal workbook. What I want to do is share the workbook so that other users can access and change the document at the same time. However when the macro runs in a shared workbook it doesn't copy the template worksheet. Not sure where I am going wrong. The code is Sub createsheet() Dim wSheet As Worksheet Dim UserName As String Dim initial As String initial = Range("initial") On Error Resume Next Set wSheet = Worksheets(initial) If wSheet Is Nothing Then MsgBox ("This is the first time you have used this so we just need to set up your user name") Application.UserName = InputBox("Input your user name here in format 'Joe Bloggs'", , Application.UserName) UserName = Application.UserName Range("currentuser").Value = UserName Worksheets("template").Copy After:=Worksheets("front") Sheets(2).Name = initial ActiveWorkbook.Save 'Sheets(Initial).Visible = False Else End If On Error GoTo 0 End Sub Any help would be appreciated. Thanks Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying worksheets? | Excel Worksheet Functions | |||
copying worksheets | Excel Worksheet Functions | |||
Copying to other worksheets | Excel Discussion (Misc queries) | |||
Copying worksheets | Excel Worksheet Functions | |||
copying worksheets | Excel Discussion (Misc queries) |