Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying worksheets? KellyLC Excel Worksheet Functions 2 October 5th 09 10:36 PM
copying worksheets Robin Scott Excel Worksheet Functions 4 October 21st 08 03:49 PM
Copying to other worksheets Putz Excel Discussion (Misc queries) 1 September 4th 05 06:29 PM
Copying worksheets gingerly88 Excel Worksheet Functions 2 August 1st 05 06:58 PM
copying worksheets tea1952 Excel Discussion (Misc queries) 2 January 5th 05 07:11 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"