Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change
Private Sub CommandButton1_Click() [a1].Activate to Private Sub CommandButton1_Click() Application.Goto worksheets("LOADSHEET").Range("A1"), True -- Regards, Tom Ogilvy Antonov wrote in message ... Hello group, and Rick (if you are reading this... thank you!) I have a problem with a userform and a textbox in this userform. I use the userform to input data into a worksheet ("LOADPLAN"). What I need is to be able to see the data of a cell in a different worksheet ("LOADSHEET" I53) in a textbox in the userform. How can I do it? Below you will find all the formulas that are in the userform. Private Sub CommandButton1_Click() [a1].Activate findvalue = UCase(ComboBox4.Value) If Not ActiveSheet.UsedRange.Find(findvalue, lookat:=xlWhole, matchcase:=True) Is Nothing Then ActiveSheet.UsedRange.Find(findvalue, lookat:=xlWhole, matchcase:=True).Activate Else MsgBox "The Position could not be found" Exit Sub End If With ActiveCell If Right(findvalue, 1) = "L" Then If .Offset(-1, 0).Value = "" Then If ActiveSheet.UsedRange.Find (ComboBox2.Value, lookat:=xlWhole) Is Nothing Then .Offset(-2, 0) = ComboBox2.Value Else MsgBox "Pallet already in use" Exit Sub End If .Offset(-4, 0) = ComboBox1.Value .Offset(-3, 0) = TextBox1.Value .Offset(-1, 0) = TextBox2.Value Else MsgBox "Position is already taken" Exit Sub End If Else If .Offset(1, 0).Value = "" Then If ActiveSheet.UsedRange.Find (ComboBox2.Value, lookat:=xlWhole) Is Nothing Then .Offset(3, 0) = ComboBox2.Value Else MsgBox "Pallet already in use" Exit Sub End If .Offset(1, 0) = ComboBox1.Value .Offset(2, 0) = TextBox1.Value .Offset(3, 0) = ComboBox2.Value .Offset(4, 0) = TextBox2.Value Else MsgBox "Position is already taken" Exit Sub End If End If End With TextBox1.Value = "" ComboBox1.Value = "" TextBox2.Value = "" ComboBox2.Value = "" ComboBox3.Value = "" ComboBox4.Value = "" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm | Excel Worksheet Functions | |||
UserForm | Excel Discussion (Misc queries) | |||
UserForm Help | Excel Discussion (Misc queries) | |||
userform | Excel Programming | |||
Userform | Excel Programming |