Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Previously Active Cell
Hi
Worksheet module code: Private Sub Worksheet_Change(ByVal Target As Range) Set UserForm1.MyCell = Target(1).Offset(0, 1) Application.EnableEvents = False UserForm1.Show End Sub Userform module code: Option Explicit Public MyCell As Range Private Sub CommandButton1_Click() Unload Me End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) MyCell.Value = TextBox1.Text Application.EnableEvents = True End Sub HTH. Best wishes Harald "CDotWin" skrev i melding ... How do I make the previously active cell, the current active cell after running a subroutine in VB??? i.e. - I input "Tech" into cell C6 and press Enter (the active cell now becomes cell C7), and a userform appears. I want the data entered into the textboxes in the userform to appear in the cell D6. Please HELP.... Thanks - CDotWin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting Previously Active Cell
Glad to hear that. My implementation instructions wasn't among the most
detailed, so you're doing very well. Thanks for the feedback. Best wishes Harald "CTInt04" skrev i melding ... Works like a charm!!! Thanks!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting all the active cells in a named column. | Excel Worksheet Functions | |||
Selecting cells on active row | Excel Discussion (Misc queries) | |||
Selecting/Highlighting active cells | Excel Discussion (Misc queries) | |||
Selecting active area of sheet | Excel Discussion (Misc queries) | |||
Selecting Active Cell before Text Import Routine | Excel Programming |