Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro stop if file in use by other user? | Excel Discussion (Misc queries) | |||
embedding a macro when generating a CSV file | Charts and Charting in Excel | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
Shared File & Freeze panes issue | Excel Discussion (Misc queries) | |||
Macro "1 tall/1 wide" not working properly | Excel Worksheet Functions |