0
您好,我正在用VBA編寫用戶表單代碼。VBA用戶表格填寫整列
代碼找到具有給定名稱的列,然後它應該填充列,直到包含數據的最後一行包含用戶表單中的值。
任何想法我該怎麼做?
Dim intBB As Integer
Do While Worksheets("Sheet1").Cells(1, intBB) <> ""
If Worksheets("Sheet1").Cells(1, intBB).Value = "HPL" Then
With Worksheets("Sheet1")
Set rngBB = .Range(.Cells(1, intBB), .Cells(1, intBB))
End With
Exit Do
End If
intBB = intBB + 1
Loop
Cells(2, intBB).Value = HPLBox.Value