Question about Microsoft Office Standard for PC

1 Answer

Excel 2003 / 2007 vba code

This code bombs in excel 2007 but works in excel 2003. I need it to work in both.
Dim NewPageName As String
Sheets("Lab Work Order Master").Visible = True
Sheets("Lab Work Order Master").Copy After:=ActiveSheet
NewPageName = InputBox("What would you like to call your new Worksheet")
ActiveWindow.ActiveSheet.Name = NewPageName
Sheets("Lab Work Order Master").Visible = False
End Sub
It bombs on the "Copy After" line.

Posted by on

  • geekware May 11, 2010

    The code is not with your question. I need to see it before i can help.


1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 23 Answers

A similiar thing happened to me once and I used the format
"Sheets("Lab Work Order Master").Copy(,ActiveSheet)" instead of
"Sheets("Lab Work Order Master").Copy After:=ActiveSheet"

You may also want to try using a sheet index instead of "ActiveSheet" to refer to your sheet.
P.S. Don't forget to rate me. Wish you the best.

Posted on Dec 12, 2008

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add


Microsoft Office Standard for PC Logo

239 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18297 Answers

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3267 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides