textbox help

hail11

Board Regular
Joined
May 3, 2007
Messages
199
Private Sub TextBox20_Change()
Sheets("Sheet1").Range ("b28")
End Sub

i want textbox20 to = cell b28 this isn't working?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

hail11

Board Regular
Joined
May 3, 2007
Messages
199
how do i get it so it auto populates when that vb screen comes up so i don't have to click on it. Also how can i change the number if it is wrong in the textbox
 
Upvote 0

Gates Is Antichrist

Well-known Member
Joined
Aug 15, 2002
Messages
1,961
In your ThisWorkbook code put
Code:
Private Sub Workbook_Open()
  Sheet1.activate
  Sheet1.TextBox20 = Range("b28")
End Sub
Did you really mean "that VB screen?"
 
Upvote 0

hail11

Board Regular
Joined
May 3, 2007
Messages
199
Private Sub Workbook_Open()
Sheet1.activate
Sheet1.TextBox20 = Range("b28")
End Sub

i am using a userform1

so whenever it is open i need to have the textboxes filled in so i can see if they are correct

this isn't pulling it up............
 
Upvote 0

Gates Is Antichrist

Well-known Member
Joined
Aug 15, 2002
Messages
1,961
sheet1.activate
userform1.textbox20.value = activesheet.range("b28")
userform1.show
 
Upvote 0

hail11

Board Regular
Joined
May 3, 2007
Messages
199
would it be like this then?


Private Sub UserForm_open()
sheet1.Activate
j.TextBox20.Value = ActiveSheet.Range("a1")
j.Show
End Sub

when i open it nuthing comes up
 
Upvote 0

Forum statistics

Threads
1,190,775
Messages
5,982,846
Members
439,799
Latest member
matts12

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
Top