Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Selecting Range after splash screen

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Baltimore
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Anyone know where to place code, to select a range after the splash screen is ran? I have tried two locations and neither is working. Unless I'm using the wrong code to select.

    Sheets("Pizza Parlor").Select Range("A5")

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try putting the following in the workbook_open procedure in the "ThisWorkbook" module:

    Code:
    Application.Goto Sheets(1).[a5]
    Leave frmWelcome.Show there, just replace the worksheet select code that's in there.

    Hope this helps.


    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-09 14:07 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry, misread the question!!!

    James

    _________________


    [ This Message was edited by: James on 2002-05-09 14:07 ]

  4. #4
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Private Sub Workbook_Open()
    Sheets("Pizza Parlor").Range("A5").select
    End Sub
    <MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee>

  5. #5
    New Member
    Join Date
    May 2002
    Location
    Baltimore
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yep, that did it. thanks. Is there an easy way to shorten these if statements?

    If OPTPan.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "Personal"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 4.99 + 0.5 * bytToppings

    End If
    If OPT10inch.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "10 inch"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 5.99 + 0.5 * bytToppings
    End If

    If OPT12inch.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "12 inch"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 7.99 + 0.5 * bytToppings
    End If

    If OPT14inch.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "14 inch"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 9.99 + 0.5 * bytToppings
    End If

    If OPT16inch.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "16 inch"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 10.99 + 0.5 * bytToppings
    End If
    If OPTSicilian.Value = True Then
    Sheets("Order Table").Range("C" & intcurrentrow).Value = "Sicilian"
    Sheets("Order Table").Range("D" & intcurrentrow).Value = 11.5 + 0.5 * bytToppings
    End If

  6. #6
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I get an error with this if I run it from a different sheet:

    Code:
    Sheets("Pizza Parlor").Range("A5").select
    Might want to go with:

    Code:
    Application.Goto ("Pizza Parlor").[a5]

  7. #7
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    Change your Option buttons to a dropdown list then all the if's could be replaced with one case statement
    <MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee>

  8. #8
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I personally like your option buttons, and they work, not sure why you'd want to 'fix' them....Did Jay's code work?

    I'd personally focus more on creating an 'update address' button, form and corresponding code, in the event that your customer keeps their phone number and changes address'....
    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-09 14:13 ]

  9. #9
    New Member
    Join Date
    May 2002
    Location
    Baltimore
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The first one worked Nate. Well I'll just keep the crappy if's then. I need to format the Range D for currency also. What code would I place after?

  10. #10
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Code need not apply. Go to your second sheet, click on D (column header) than click the $ button. This should be all that is required.

    Did you try Jay's array code?

    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-09 14:15 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •