Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.
Any suggestions greatly appreciated on how to correct or an alternative method for achieving this.
Sub CreateCopy() SourceFile = ActiveWorkbook.Name Sheets("Current").Select ShtCount = ActiveWorkbook.Sheets.Count Do NewPeriod = InputBox("Enter period number for copied sheet.", "Period Number", "AP#") If NewPeriod = vbCancel Then Exit Sub For Each Sht In ActiveWorkbook.Sheets If Sht.Name = NewPeriod Then NameExists = True ErrMsg = MsgBox("That sheet exists! Choose a new name.") If ErrMsg = vbCancel Then Exit Sub End If Next Sht Loop Until NameExists = False Sheets("Current").Copy Sheets("Current").Name = NewPeriod NewFile = ActiveWorkbook.Name For I = 1 To UBound(arrLinks) MyLink = arrLinks(I) Application.DisplayAlerts = False ActiveWorkbook.BreakLink Name:=MyLink, Type:=xlExcelLinks Application.DisplayAlerts = True Next Sheets(NewPeriod).Select Sheets(NewPeriod).Move Before:=Workbooks(SourceFile).Sheets(ShtCount) Windows(NewFile).Activate ActiveWindow.Close SaveChanges:=False End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|sending mail each sheet to respective DL with a message prompt||3||43|
|Automate an Oracle update in Excel||7||63|
|Issue with nested if statement and vlookup formula||4||40|
|If delete cells data or enter 0 then display message||3||20|
Join the community of 500,000 technology professionals and ask your questions.