Posts by Sathia.N.G.
-
-
-
-
Re: Run-time error '424'
Hi,
I was make a mistake to change the actual values causing the error.
After corrected it, worked perfectly.
Thanks. -
-
Re: Run-time error '424'
Hi,
Actually Userform3 is exist. -
Re: Unhide sheet base on ComboBox1 value and if YES
New thread raised with title,
Run-time error '424' -
When click the CommondButto1, having
Run-time error '424'
Object required.
And debug highlighted for the button.
Unable to show Userform3.
How to avoid this? -
-
Re: Unhide sheet base on ComboBox1 value and if YES
I have an another problem on this thread.
When I apply those code at my actual workbook, having an error for:-
Compile Error:-
Variable no defined.and it has been highlight 'mysheet'.
When I'm trying to put 'Dim mysheet as worksheet' or 'workbook',
having error at userform:
Run-time error '424'
Object required.Actual mother sheet name is 'Disposition Detail'.
Can help...
-
Hi,
I have a workbook that content different amount of sheets at different situation.
The workbook will be used by different persons at different times.
So I want add another additional sheet at the end of the sheets to update every activities that performed by every persons.
(Person information/login was captured by window login ID)
Maybe like:-
Jason - Edited sheet Reowrk (sheet name) on 30/9/2015 5:57:11 PM
Angle - Edited sheet Abort on 30/9/2015 6:00:19 PM
and so on...This sheet need to active only for VBA and cannot be edited by manual.
Any suggestion...
-
Re: Unhide sheet base on ComboBox1 value and if YES
Hi Mentor,
Perfectly complete the task after adding your previous code at Userform_Initialized.Successfully completed the thread..
Thank you very much.
-
Re: Unhide sheet base on ComboBox1 value and if YES
Bravo...
Another two things for senario issue,
If after CB1 selected and selected sheet was visible, and select again the userform1 with 'No', still visible the previously selected sheet even 'No' pressed.
2nd, it took 20 to 30 seconds to load to unload. -
Re: Unhide sheet base on ComboBox1 value and if YES
Hi Mr. Pike,
I am still having difficulties to unhide sheet.
Please correct my error...Code
Display MorePrivate Sub CommandButton1_Click() With ActiveSheet Range("G2").Value = ComboBox1.Value Range("G3").Value = ComboBox2.Value End With Msg = "Customer product calculation required?" Style = vbYesNo Title = "Submit" response = MsgBox(Msg, Style) If response = vbYes Then Msg = "Product calculation sheet activated." & vbCrLf & "Please choose correct calculation table to calculate" & vbCrLf & "base on Part type." Style = vbOKOnly Title = "Thanks!" responseResult = MsgBox(Msg, Style) If responseResult = vbYes Then Dim aWks As Worksheet For Each mysheet In Array("i-Phone Calculation", "Samsung Calculation", "Asus Calculation", "Opto Calculation") Worksheets(mysheet).Visible = False Next Select Case Me.ComboBox1.Value Case "Apple i-Phone" Worksheets("i-Phone Calculation").Visible = True Case "Samsung Phone" Worksheets("Samsung Calculation").Visible = True Case "Asus" Worksheets("Asus Calculation").Visible = True Case "Opto" Worksheets("Opto Calculation").Visible = True Case Else Next aWks MsgBox "Done!" End Select Else MsgBox "Have a nice Day" End If Else MsgBox "Good by" End If Unload Me End Sub
-
Re: Unhide sheet base on ComboBox1 value and if YES
Actually there are few other sheets also! When different persons used the workbook. Its possible to save in different arrangement. So if its by the name, could be more safe.
-
Re: Unhide sheet base on ComboBox1 value and if YES
Sorry.
I have different combobox list and index number and the worksheets index number.
Any other solutions? -
Re: Unhide sheet base on ComboBox1 value and if YES
Hi Pike,
Great sequences.
But i have problem with unhide sheet. It's not unhide at all.
I believe it should be due to ComboBox1 index value and the sheet name is different.
How can it be work with different names?Thank you.
[ATTACH=CONFIG]67059[/ATTACH]
-
Re: Unhide sheet base on ComboBox1 value and if YES
Correction after slight changes.
Hi,
Need correction on my below codes.
In 'Sheet1', commandButton1 clicked to show an UserForm1 with 2 ComboBoxes and a CommandButton for 'OK'.
ComboBox1 index to select ComboBox2 sub-index and paste the value at required cell range.Once click CommandButton1 or 'OK' at userform1 I want to activate MsgBox that content vbYes & vbNo.
If press 'YES', then need to activate/visible hidden sheet, base on ComboBox1 value.
ComboBox1 Index:-
if Apple i-Phone, visible sheet name 'i-Phone calculation'
if Samsung Phone, visible sheet name 'Samsung calculation'
if Asus, visible sheet name 'Asus calculation'
if Opto, visible sheet name 'Opto calculation'Another MsgBox to triggered to alert.
If press 'NO', then just popup a MsgBox as a 'Thanks' and 'enjoy your day'.
Please help...
Code
Display MorePrivate Sub ComboBox1_Change() Dim index As Integer index = ComboBox1.ListIndex ComboBox2.Clear Select Case index Case Is = 0 With ComboBox2 .AddItem "i-phone 3" .AddItem "i-phone 4" .AddItem "i-phone 5" .AddItem "i-phone 6" .AddItem "i-phone 6s" .AddItem "i-phone 6sPlus" End With Case Is = 1 With ComboBox2 .AddItem "Note3" .AddItem "Note4" .AddItem "Note5" .AddItem "Tab" .AddItem "Galaxy-S4" .AddItem "Galaxy-S5" .AddItem "Galaxy-S6" .AddItem "Galaxy-6-Edge" End With Case Is = 2 With ComboBox2 .AddItem "Asus-4" .AddItem "Asus-5" .AddItem "Asus-6" .AddItem "Asus-7" .AddItem "Asus-8" End With Case Is = 3 With ComboBox2 .AddItem "Opto-1" .AddItem "Opto-2" .AddItem "Opto-3" .AddItem "Opto-4" End With End Select End Sub Private Sub UserForm_Initialize() With ComboBox1 .AddItem "Apple i-Phone" .AddItem "Samsung Phone" .AddItem "Asus" .AddItem "Opto" End With End Sub Private Sub CommandButton1_Click() With ActiveSheet Range("G2").Value = ComboBox1.Value Range("G3").Value = ComboBox2.Value End With Msg = "Customer product calculation required?" Style = vbYesNo Title = "Submit" response = MsgBox(Msg, Style) If response = vbYes Then Msg = "Product calculation sheet activated." & vbCrLf & "Please choose correct calculation table to calculate" & vbCrLf & "base on Part type." Style = vbOKOnly Title = "Thanks!" response = MsgBox(Msg, Style) End If Dim aWks As Worksheet For Each aWks In ThisWorkbook.Worksheets If aWks.Name <> ComboBox1.Parent.Name Then If InStr(1, aWks.Name, ComboBox1.List(ComboBox1.ListIndex)) Then aWks.Visible = xlSheetVisible aWks.Select: aWks.Range("A1").Select Else aWks.Visible = xlSheetVeryHidden End If End If Next aWks End Sub If response = vbNo Then Msg = "Enjoy your work." Style = vbOKOnly Title = "Thanks!" response = MsgBox(Msg, Style) End If If response = vbOK Then Unload Me End If Exit Sub End If End Sub
-
Hi,
Need correction on my below codes.
In 'Sheet1', commandButton1 clicked to show an UserForm1 with 2 ComboBoxes and a CommandButton for 'OK'.
ComboBox1 index to select ComboBox2 sub-index and paste the value at required cell range.Once click CommandButton1 or 'OK' at userform1 I want to activate MsgBox that content vbYes & vbNo.
If press 'YES', then need to activate/visible hidden sheet, base on ComboBox1 value.
ComboBox1 Index:-
if Apple i-Phone, visible 'Sheet2'
if Samsung Phone, visible 'Sheet4'
if Asus, visible 'Sheet5'
if Opto, visible 'Sheet7'Another MsgBox to triggered to alert.
If press 'NO', then just popup a MsgBox as a 'Thanks' and 'enjoy your day'.
Please help...
Code
Display MorePrivate Sub ComboBox1_Change() Dim index As Integer index = ComboBox1.ListIndex ComboBox2.Clear Select Case index Case Is = 0 With ComboBox2 .AddItem "i-phone 3" .AddItem "i-phone 4" .AddItem "i-phone 5" .AddItem "i-phone 6" .AddItem "i-phone 6s" .AddItem "i-phone 6sPlus" End With Case Is = 1 With ComboBox2 .AddItem "Note3" .AddItem "Note4" .AddItem "Note5" .AddItem "Tab" .AddItem "Galaxy-S4" .AddItem "Galaxy-S5" .AddItem "Galaxy-S6" .AddItem "Galaxy-6-Edge" End With Case Is = 2 With ComboBox2 .AddItem "Asus-4" .AddItem "Asus-5" .AddItem "Asus-6" .AddItem "Asus-7" .AddItem "Asus-8" End With Case Is = 3 With ComboBox2 .AddItem "Opto-1" .AddItem "Opto-2" .AddItem "Opto-3" .AddItem "Opto-4" End With End Select End Sub Private Sub UserForm_Initialize() With ComboBox1 .AddItem "Apple i-Phone" .AddItem "Samsung Phone" .AddItem "Asus" .AddItem "Opto" End With End Sub Private Sub CommandButton1_Click() With ActiveSheet Range("G2").Value = ComboBox1.Value Range("G3").Value = ComboBox2.Value End With Msg = "Customer product calculation required?" Style = vbYesNo Title = "Submit" response = MsgBox(Msg, Style) If response = vbYes Then Msg = "Product calculation sheet activated." & vbCrLf & "Please choose correct calculation table to calculate" & vbCrLf & "base on Part type." Style = vbOKOnly Title = "Thanks!" response = MsgBox(Msg, Style) End If Dim aWks As Worksheet For Each aWks In ThisWorkbook.Worksheets If aWks.Name <> ComboBox1.Parent.Name Then If InStr(1, aWks.Name, ComboBox1.List(ComboBox1.ListIndex)) Then aWks.Visible = xlSheetVisible aWks.Select: aWks.Range("A1").Select Else aWks.Visible = xlSheetVeryHidden End If End If Next aWks End Sub If response = vbNo Then Msg = "Enjoy your work." Style = vbOKOnly Title = "Thanks!" response = MsgBox(Msg, Style) End If If response = vbOK Then Unload Me End If Exit Sub End If End Sub
-
I have userform3 with 2 combobox and a 'Done' button.
Want to unhide selected sheet base on combobox1 value and if 'YES'/required.
If Comboxbox1 selected and 'No', no need to unhide any hidden sheet.
I think need correction on last phase:- Please help to correct...Code
Display MoreOption Explicit Private Sub ComboBox1_Change() Dim index As Integer index = ComboBox1.ListIndex ComboBox2.Clear Select Case index Case Is = 0 With ComboBox2 .AddItem "i-phone 3" .AddItem "i-phone 4" .AddItem "i-phone 5" .AddItem "i-phone 6" .AddItem "i-phone 6s" .AddItem "i-phone 6sPlus" End With Case Is = 1 With ComboBox2 .AddItem "Note3" .AddItem "Note4" .AddItem "Note5" .AddItem "Tab" .AddItem "Galaxy-S4" .AddItem "Galaxy-S5" .AddItem "Galaxy-S6" .AddItem "Galaxy-6-Edge" End With Case Is = 2 With ComboBox2 .AddItem "Asus-4" .AddItem "Asus-5" .AddItem "Asus-6" .AddItem "Asus-7" .AddItem "Asus-8" End With Case Is = 3 With ComboBox2 .AddItem "Opto-1" .AddItem "Opto-2" .AddItem "Opto-3" .AddItem "Opto-4" End With End Select End Sub Private Sub UserForm_Initialize() With ComboBox1 .AddItem "Apple i-Phone" .AddItem "Samsung Phone" .AddItem "Asus" .AddItem "Opto" End With End Sub Private Sub CommandButton1_Click() With ActiveSheet Range("G2").Value = ComboBox1.Value Range("G3").Value = ComboBox2.Value End With Next Msg = "Customer product calculation required?" Style = vbYesNo Title = "Submit" Response = MsgBox(Msg, Style) If Response = vbYes Then Sheets("Sheet2").Visible = checkBox1.Value(o) Sheets("Sheet3").Visible = checkBox1.Value(1) Sheets("Sheet4").Visible = checkBox1.Value(2) Sheets("Sheet5").Visible = checkBox1.Value(3) End If Msg = "Product calculation sheet activated." & vbCrLf & "Please choose correct calculation table to calculate" & vbCrLf & "base on Part type." Style = vbOKOnly Title = "Thanks!" Response = MsgBox(Msg, Style) If Response = vbOK Then Unload Me End If Else Exit Sub End If End Sub