0
我是Excel-VBA的新手。我試圖用「我愛你」取代所有第一列,直到第一個空行。然而,做,直到環扔「運行時錯誤1004應用程序定義或對象定義的錯誤。我明白任何迴應:)VBA Excel-application.counta()拋出應用程序和對象定義錯誤
Sub Macro1()
Dim sheet As Worksheet
Dim RowIndex As Integer
Set sheet = ActiveSheet
RowIndex = 0
Do Until Application.CountA(sheet.Rows(RowIndex)) = 0
Cells(RowIndex, 1) = "I love u"
RowIndex = RowIndex + 1
Loop
End Sub
太傻了我...無論如何,THX這麼多! – Dodo 2014-11-07 02:29:26