0
Ich bin neu, VBA-Codierung zu übertreffen. Ich habe die Adresse der letzten nicht leeren Zelle in einer Zeile A1 Und jetzt möchte ich zur nächsten rechten Zelle bewegen.Wechseln zur nächsten Zelle in einer Zeile
Dim ws As Worksheet
Dim cell1 As String
Dim cell2 As String
Dim rng1 As Range
Set ws = Sheets("ADS User Data")
Set rng1 = ws.Rows(1).Find("*", ws.[a1], xlFormulas, , xlByColumns, xlPrevious)
MsgBox rng1
If Not rng1 Is Nothing Then
'MsgBox "rng1 contains " & rng1.Address(0, 0)
cell1 = (rng1.Address(0, 0))
cell2 = ActiveCell.Offset(1, 0).Select()
MsgBox cell1
MsgBox cell2
Else
MsgBox ws.Name & " row A1 is completely empty", vbCritical
End If
Ausgangszelle Adresse: API1
REQ: Recht auf die Ausgabezelle Adresse verschieben (API1), dh der Ausgang APJ1 ist
mir jemand plz helfen kann.
'cell2 = rng1.Offset (0, 1) .Address (0,0) ' –
das funktioniert gut. Danke Scott. – Dhiman