Makro ergänzen ?
20.04.2014 17:08:29
walter
erst ma:
Frohe Ostern !
Anbei habe ich ein Makro, auch über dieses Forum
erhalten. Es funktioniert einwandfrei !
Nun möchte ich das, dass in der Spalte 10
diese Formel gesetzt wird, ich krieg es nicht hin, leider !
'ActiveCell.FormulaR1C1 = "=TODAY()-RC[-1]"
Private Sub CommandButton12_Click()
Dim wbDatei, wb As Workbook
Dim wsData As Worksheet
Dim aVarData() As String
Dim lngY As Long
Dim strValue As String
Dim lngRow As Long
Set wsData = Sheets("Datenbank")
Dim ww
ww = UFDatenbank.TextBox1.Value 'ww ist die Zahl in der Textbox1 steht
lngRow = ww + 2
Dim lLetzte As Long
Dim iIndex As Integer
Application.ScreenUpdating = False
With Worksheets("Datenbank")
For iIndex = 2 To 25
.Cells(ww + 2, iIndex).Value = Trim(Controls("TextBox" & iIndex).Text)
Next iIndex
End With
' in Spalte 10
'ActiveCell.FormulaR1C1 = "=TODAY()-RC[-1]"
Application.ScreenUpdating = True
End Sub
mfg
Walter p