Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Macro not working properly when the file is shared

Hi all,

I am encountering a specific scenerio where in I am creating a new file
by copying one of the sheets and renaming that with todays date.
, here starts me problem when I try to share the sheet to work around I
am seeing that th macro is not copying the sheet properly even though i
have given PasteSpecial

The code goes here

Sub Newsheet()
sheetname = Format(Now, "dd-mmm-yyyy")
MsgBox sheetname
sheet_count = Worksheets.Count
'Checking for Replication
Wksnameexists = WorksheetExists(sheetname)
If Wksnameexists = True Then
MsgBox "Sheet exists Cannot Create More than one Instance"
End
Else
r = Sheets(sheet_count).Select(2)
Sheets("Template").Select
Cells.Select
Application.CutCopyMode = False
Selection.Copy
'Adding the Worksheet
Worksheets.Add
ActiveSheet.Name = sheetname
Cells.Select
'Copying the Worksheet
'ActiveSheet.Paste
ActiveSheet.PasteSpecial
Range("A1").Select
End If

End Sub

Please suggest any other scenerio using which i can use the sheet when
its shared.
I tried giving
"ActiveSheet.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False"

I would be very happy for any pointers to resolve this issue

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
Macro stop if file in use by other user? Bry Excel Discussion (Misc queries) 5 August 11th 06 04:27 PM
embedding a macro when generating a CSV file Fred Charts and Charting in Excel 1 February 16th 06 12:16 AM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 15th 05 11:13 PM
Shared File & Freeze panes issue JM Excel Discussion (Misc queries) 0 January 21st 05 07:01 PM
Macro "1 tall/1 wide" not working properly gizmo Excel Worksheet Functions 2 January 10th 05 07:18 PM


All times are GMT +1. The time now is 01:27 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"