UserForm Opening set values to contents of activecell.value

dukeofscouts

Board Regular
Joined
Jan 19, 2009
Messages
146
I've been toying with Userforms for about a week now. Thanks to google I've been able to find lots of help with trouble shooting most of my issues. However, this one has me stumped. When I run the macro to call the userform, it says that the Find function is not recognized. According to all the data I can dig up Find does work in VBA. Where did I make the wrong turn?


Private Sub UserForm_Initialize()
Tectbox1.Value = ActiveCell.Value
TextBox2.Value = Left(ActiveCell.Offset(1, 0), 3)
TextBox3.Value = Right(ActiveCell.Offset(1, 0), Len(ActiveCell.Offset(1, 0) - Find(":", ActiveCell.Offset(1, 0))))
TextBox4.Value = Mid(ActiveCell.Offset(1, 0), 5, 3)
TextBox5.Value = Mid(ActiveCell.offser(1, 0), 9, 2)
TextBox6.Value = Left(ActiveCell.Offset(2, 0), Find("@", ActiveCell.Offset(2, 0) - 1))
TextBox7.Value = Right(ActiveCell.Offset(2, 0), Find("@", ActiveCell.Offset(2, 0) - 2))
TextBox8.Value = Left(ActiveCell.Offset(3, 0), Find("-", ActiveCell.Offset(3, 0) - 1))
TextBox9.Value = Right(ActiveCell.Offset(3, 0), Find(">", ActiveCell.Offset(3, 0) - 2))
End Sub
 
Well updates seemed to have worked,but now VBA is have an issue with the third line of code, the whole line of code. It gives me the error: "This object does not support the action or property". (or somthing to that extent). Is it that we can't split a cell using a calculation to get the number of characters?

Private Sub UserForm_activate()
TextBox1.Value = ActiveCell.Value
TextBox2.Value = Left(ActiveCell.Offset(1, 0), 3)
TextBox3.Value = Right(ActiveCell.Offset(1, 0), Len(ActiveCell.Offset(1, 0)) - Application.Worksheet.Find(":", ActiveCell.Offset(1, 0)))
TextBox4.Value = Mid(ActiveCell.Offset(1, 0), 5, 3)
TextBox5.Value = Mid(ActiveCell.Offset(1, 0), 9, 2)
TextBox6.Value = Left(ActiveCell.Offset(2, 0), Application.Worksheet.Find("@", ActiveCell.Offset(2, 0) - 1))
TextBox7.Value = Right(ActiveCell.Offset(2, 0), Application.Worksheet.Find("@", ActiveCell.Offset(2, 0) - 2))
TextBox8.Value = Left(ActiveCell.Offset(3, 0), Application.Worksheet.Find("-", ActiveCell.Offset(3, 0) - 1))
TextBox9.Value = Right(ActiveCell.Offset(3, 0), Application.Worksheet.Find(">", ActiveCell.Offset(3, 0) - 2))
End Sub
 
Upvote 0

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