Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code I wrote here works fine except if I don't have the Range("F2").Select in the event sub the double-click leaves F1 in the edit mode.
I can live with that but the range.select haunts me and I'd really prefer that F1 became the target cell after the code runs, but NOT in the edit mode. Thanks. Howard (Off topic... I notice a bunch of words are underscored in red. Is this part of the new forum upgrade?) Option Explicit Sub MsgBoxNotes() Dim d As String, e As String, f As String d = Range("A1") e = Range("A2") f = Range("A3") MsgBox d & vbCr & vbCr & e & vbCr & vbCr & f End Sub Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim MyIntl As String If Target = Range("F1") Then MyIntl = InputBox("Enter your Initials :", "Read Notes.") If Len(MyIntl) = 0 Then MsgBox "Enter your initials to read notes", vbCritical Else Cells(Rows.count, Range("F1").Offset(1, 0).Column).End(xlUp) _ .Offset(1, 0) = MyIntl Cells(Rows.count, Range("F1").Offset(1, 1).Column).End(xlUp) _ .Offset(1, 0) = Format(Now(), "dd/MM/yyy hh:mm AMPM") Range("F2").Select MsgBoxNotes End If End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Previously Selected worksheet (and/or select previouslyselected workbook) | Excel Programming | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
How to Pre-Select items in Multi-Select List on Form | Excel Programming | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
error - select method failed - (columns.select) | Excel Programming |