Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Step by Step Microsoft Excel 2013 Chapter 12

Step by Step Microsoft Excel 2013 Chapter 12 Pages 361-400
Exercise PackageWeight
Page 390 does not work for me with Excel 2010...
Data out of bounds line 9: Worksheets("Records").Activate
What should I change to make it work??

Private Sub CommandButton1_Click()
Dim lngFirstRow As Long
Worksheets(“Records”).Activate
lngFirstRow = Worksheets(“Records”).Range(“A1048576”).End(xlUp).Row + 1
Cells(lngFirstRow, 1) = TextBox1.Value
Cells(lngFirstRow, 2) = TextBox2.Value
Cells(lngFirstRow, 3) = ListBox1.Value
Cells(lngFirstRow, 4) = OptionButton1.Value
Cells(lngFirstRow, 5) = OptionButton2.Value
Cells(lngFirstRow, 5).Activate
End Sub
1 person has
this question
+1
Reply
  • Hello Vernon,

    I have forwarded your question on to our Book Tech staff, so they can help you find a solution. If you ever have any questions or issues with the content of a title, you can also contact them directly at booktech@oreilly.com or call them at:

    1-800-889-8969
    or
    1-707-827-7019 (outside the USA)
    7:30 am to 5:00 PST

    Best regards,
    Paul Fichera
    Customer Service Representative
    O'Reilly Media
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • Hi Vernon,

    I'm sorry to hear that isn't working for you, but you are using Excel 2010 instead of the version that the book is written about Excel 2013. The way to fix that is to use the correct version of Excel. We can't customize the examples in the book for other versions of Excel.

    Best regards,
    Chris Olson
    O'Reilly Book Support
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • I’m frustrated
    Thanks for the reply. How about if I ask the question differently --
    What is new for Excel 2013 in this VB macro code found on page 390 of
    Step by Step Microsoft Excel 2013 ?

    Private Sub CommandButton1_Click()
    Dim lngFirstRow As Long
    Worksheets(“Records”).Activate
    lngFirstRow = Worksheets(“Records”).Range(“A1048576”).End(xlUp).Row + 1
    Cells(lngFirstRow, 1) = TextBox1.Value
    Cells(lngFirstRow, 2) = TextBox2.Value
    Cells(lngFirstRow, 3) = ListBox1.Value
    Cells(lngFirstRow, 4) = OptionButton1.Value
    Cells(lngFirstRow, 5) = OptionButton2.Value
    Cells(lngFirstRow, 5).Activate
    End Sub
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned