Userform value to active cell

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,226
Office Version
  1. 2007
Platform
  1. Windows
Hi,
On Searching for a code I can only see how to get a value from active cell to a userform textbox.

I’m wanting to have a value from textbox1 put in the worksheet active cell.

Can you advise please.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Something along the lines of this maybe:

VBA Code:
Activecell.Value = Textbox1.Value
 
Upvote 0
How would that work from a userform.
Open userform & enter the value so when closing userform the value is now in a active cell.

Seems to be to easy seeing that I was unable to find anything when searching.
 
Upvote 0
How would that work from a userform.
Open userform & enter the value so when closing userform the value is now in a active cell.

Seems to be to easy seeing that I was unable to find anything when searching.
Can you show the userform code you are using? Use the vba code tags to post it.
 
Upvote 0
I haven’t started it yet. 5am woke up thinking of how to do it ha ha

My goal is to get value from textbox to active cell.
Or input box value to active cell.

Also need advise if possible to do this.
Open userform where a textbox would show active cell address.
So if a five cell is Z22 then when I open my userform say textbox3 would populate with Z22

Thansk.
 
Upvote 0
This is the simple idea i have but get a run time error 438 OBJECT DOESNT SUPPORT THIS PROPERTY OR METHOD
Been strugling for two days to get a move on.

The cell is selected & my userform opens.
I enter a number is Textbox 1 say 500
I press the command button expecting the value of 500 to now be shown in the active cell.
But this is when i get the error message


Rich (BB code):
Private Sub CommandButton1_Click()
   
    With ThisWorkbook.Worksheets("DATABASE")

    ThisWorkbook.Worksheets("DATABASE").ActiveCell.Value = Me.TextBox1.Text 'MILEAGE FROM LAST MONTHS SHEET
    
    Unload UserForm1
End With
End Sub
 
Upvote 0
VBA Code:
Private Sub CommandButton1_Click()
   
    ActiveCell.Value = CLng(Me.TextBox1.Text) 'MILEAGE FROM LAST MONTHS SHEET
    
    Unload Me
End Sub
Artik
 
Upvote 0

Forum statistics

Threads
1,215,123
Messages
6,123,182
Members
449,090
Latest member
bes000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top