Hi,
I debug You code, and found strange loop definition:
Look into Your 'basic' macro:
Sub basic()
Dim a, b, c, d, x As Integer
a = Application.WorksheetFunction.CountA(Worksheets("EDB").Range("A:A"))
b = Application.WorksheetFunction.CountA(Worksheets("EDB").Range("I:I"))
c = Application.WorksheetFunction.CountA(Worksheets("EDB").Range("Q:Q"))
d = Application.WorksheetFunction.CountA(Worksheets("EDB").Range("Y:Y"))
x = WorksheetFunction.Max(a, b, c, d)
a = x - ic
'Y = x - 2
'If Y < 1 Then
'Exit Sub
'Else
For a = ic + 1 To ic + a
Sheets("EDB").Range("AG" & a) = TextBox2.Value
Sheets("EDB").Range("AH" & a) = TextBox1.Value
Sheets("EDB").Range("AI" & a) = TextBox4.Value
Sheets("EDB").Range("AJ" & a) = TextBox3.Value
Sheets("EDB").Range("AK" & a) = ComboBox1.Value
Sheets("EDB").Range("AL" & a) = ComboBox2.Value
Next a
'End If
End Sub
This code should record Your text&combo boxes values record to worksheet, but what is this loop?
When I debug:
x=6, ic=6 => a=0 and the loop:
from a = 7 to 6... ??? that is not a valid loop...
Bookmarks