Gruppe
Funktion
Problem
Wie kann ich den Zellinhalt in einem zweiten Blatt in der gleichen Spalte aber einer anderen Zeile als die der aktiven Zelle ermitteln?
StandardModule: Modul1
Sub Start()
Dim wks As Worksheet
Dim iRow As Integer
Dim sTxt As String, sFile As String
Application.ScreenUpdating = False
sFile = Application.DefaultFilePath & "\unicode.html"
ActiveSheet.Copy
iRow = 2
Set wks = ThisWorkbook.Worksheets("Data")
Do Until IsEmpty(wks.Cells(iRow, 1))
Cells.Replace _
what:=wks.Cells(iRow, 1).Value, _
replacement:=wks.Cells(iRow, 2).Value, _
lookat:=xlPart, _
MatchCase:=True
iRow = iRow + 1
Loop
Open sFile For Output As #1
Print #1, "<html><head>"
Print #1, "<meta HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=UTF-8"">"
Print #1, "</head>"
Print #1, "<body>"
Print #1, Cells(1, 1).Value
Print #1, "</body></html>"
Close
ActiveWorkbook.Close savechanges:=False
Shell "explorer " & sFile, vbNormalFocus
Application.ScreenUpdating = True
End Sub