Results 1 to 20 of 29

Thread: How to enter just time in a cell

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    VBAX Regular
    Joined
    Sep 2008
    Posts
    37
    Location
    Hey Ron and all,

    Ok I did the followoing steps:
    1) Opened new workbook
    2) Entered some numbers in cells Row A1:A10. All were 5 - 6 digits long
    3) Went to Tools > Macro > VBA
    4) Clicked on Sheet 1 to open up VBA Worksheet
    5) Copeid all the code pertaining to Time from

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    Dim TimeStr As String
    .
    .
    .
    MsgBox "You did not enter a valid time"
    Application.EnableEvents = True
    End Sub
    6) Tried to F8 - Step thought the code but it would not work
    7) Clicked Save in VBA and name it Test. Closed VBA.
    8) Went to Tools > Macro > Macros and there were no macros. HUH???
    9) Closed Workbook Test and opend it back up. Was asked if I wanted to enable macros, said yes, and still could not find macro under Tools > Macro > Macros
    10) Went to Tools > Maroc > VBA and code it there but still can not F8 - Step thought the code.

    I am a bit confused.

    Thanks
    Dave
    Last edited by Aussiebear; 04-19-2023 at 01:08 AM. Reason: Adjusted the code tags

Posting Permissions

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