Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Create a USerform1 with TextBox1, SpinButton1, CommandButton1 and CommandButton2. Userform code: Option Explicit Private Sub UserForm_Initialize() Dim R As Long R = ActiveCell.Row SpinButton1.Min = 1 SpinButton1.Max = 65536 SpinButton1.Value = R CommandButton1.Caption = "delete row" CommandButton2.Caption = "insert row" End Sub Private Sub CommandButton1_Click() If ActiveCell.Row = 1 Then Exit Sub Rows(ActiveCell.Row - 1).Delete SpinButton1.Value = ActiveCell.Row - 1 End Sub Private Sub CommandButton2_Click() Rows(ActiveCell.Row).Insert Shift:=xlDown SpinButton1.Value = ActiveCell.Row + 1 End Sub Private Sub SpinButton1_Change() 'make something similar for columns. You fix. Cells(SpinButton1.Value, ActiveCell.Column).Select TextBox1.Value = ActiveCell.Formula End Sub Private Sub TextBox1_Change() ActiveCell.Formula = TextBox1.Text End Sub -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "GUS" wrote in message ... I wonder if there is a worksheet or vba example that has a userform and doing the following actions. Bring value to userform.textbox from the selected cell when first run the macro Move from cell to cell with spin button or two buttons (next-previeus) Get value from cell and then edit it trough textbox (similar to the first action) Add row line (above selectedcell) Delete row line (above selectedcell) Fit selected cell contents Add formula to the selected cell Is there any example with all of these (or some of these) as actions in a userform? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I edit directly in a cell - previously F2 | Excel Discussion (Misc queries) | |||
multiple user in excel to edit a userform | Excel Discussion (Misc queries) | |||
edit directly in cell - scroll with mouse | Excel Worksheet Functions | |||
Edit exsisting data with userform | Excel Discussion (Misc queries) | |||
edit directly in cell in Excel 2007 | New Users to Excel |