AW: Das geht wohl, war auch unlängst...
Lutz
Hallo Luc,
Du hast recht, dass funktioniert mit einer Zelle (siehe unten), nur für das ganze Arbeitsblatt müsste ich ja jede Zelle abfragen und ich dachte, dass mann das umgehen kann.
Trotzdem danke für Deinen Hinweis.
Option Explicit
Dim intz1 As Integer
Dim mark As Range
Dim strg1 As String
'
'=============================================
'Format Text oder Standard
'=============================================
'
Public Function Zellformat()
Set mark = ActiveCell
'Zellen Textformat
If Worksheets("Tabelle1").OptionButton1 = True Then
intz1 = 1
Worksheets("Tabelle1").Cells(7, 3) = "alle Zellen Textformat"
End If
'Zellen Standard
If Worksheets("Tabelle1").OptionButton2 = True Then
intz1 = 2
Worksheets("Tabelle1").Cells(7, 3) = "alle Zellen Standardformat"
End If
If intz1 = 1 Then
With Range("A1:IV65536")
.NumberFormat = "@"
End With
strg1 = Worksheets("Tabelle1").Range("C14").Formula
Worksheets("Tabelle1").Range("C14").Formula = strg1
Else
With Range("A1:IV65536")
.NumberFormat = "General"
End With
strg1 = Worksheets("Tabelle1").Range("C14").Formula
Worksheets("Tabelle1").Range("C14").Formula = strg1
End If
mark.Activate
End Function
M.f.G.
Lutz