Hi all,
When this code is in a button created by the "Forms" toolbar it works correctly...but i need it in a Combobox created by the "Control Toolbox" toolbar at it doesnt do some of the code...Can anyone figure out why??
Many Thanks
When this code is in a button created by the "Forms" toolbar it works correctly...but i need it in a Combobox created by the "Control Toolbox" toolbar at it doesnt do some of the code...Can anyone figure out why??
Code:
Private Sub ComboBox1_Change()
' Mascot Addition - Start
Application.ScreenUpdating = False
' Mascot Addition - End
Sheets("Master").Select
Dim a
Dim B
Dim C
Dim D
Dim E
Dim F
Dim G
Dim iCurrType As Integer 'Declared the variable to get the Currency Type
Dim strSheetName As String
' Go to chosen price list
' Value in cell (10, 3) generated from drop down box
E = ComboBox1.ListIndex + 1
' Version 44 change start
If E = "" Or E <= 0 Or E > 59 Then Exit Sub ' model details not available
' If E = "" Or E <= 0 Or E > 54 Then Exit Sub ' model details not available
strSheetName = Trim(Str(E))
Sheets(strSheetName).Select
' Vesion 44 change end
' Mascot Change End
' Copy all information from separate price list to Master sheet
' Mascot Change - Start
' For A = 13 To 315
' For a = 13 To 325
For a = 13 To 353
' Mascot Change - End
' B = Cells(a, 2)
C = Cells(a, 3)
D = Cells(a, 4)
G = Cells(a, 1)
' Copy Feature Description with attributes like Bold etc.
Sheets(strSheetName).Cells(a, 2).Copy
Sheets("Master").Cells(a, 2).PasteSpecial
' Sheets("Master").Cells(a, 2) = B
Sheets("Master").Cells(a, 3) = C
Sheets("Master").Cells(a, 6) = D
Sheets("Master").Cells(a, 1) = G
' Kris Check Standard items
'If a >= 51 Then
'If Sheets("Master").Cells(a, 6).Value = "STD" Then
' Sheets("Master").Cells(a, 5) = "True"
' End If
' If Sheets("Master").Cells(a, 6).Value <> "STD" Then
' Sheets("Master").Cells(a, 5) = "False"
' End If
' End If
Next a
Application.CutCopyMode = False
Sheets("Master").Select
' Mascot Change - Start
' For F = 41 To 315
' For F = 51 To 325
' Mascot Change - End
' Sheets("Master").Cells(F, 5) = "FALSE"
' Next F
' Clear Model Number from Master sheet
' Mascot Change - Start
' Sheets("Master").Cells(6, 6).Select
' Selection.ClearContents
Sheets("Master").Cells(6, 13) = 1 ' set default model to 1st. model in family
' Mascot Change - End
'
' Mascot Addition - Start
' Kris change - Clear Check Boxes
Range("E52:E354").Value = False
Range("a1").Select
Application.ScreenUpdating = True
' Mascot Addition - End
End Sub
Many Thanks