hello
I love learning vba there are so many ways to be creative...
but one of the most annoying things is this: you succeeded in creating a good thing, so you start trying the next creation...
and when that's done...? the creation before is not working anymore ...
what did i do?
I created vba to copy the last filled in row and add it as new last row, deleting all data except formula. after that
i could go through all cells in that row and fill in all new data.
it worked perfectly !!!
next goal: highlight the active cell with borders or background color... they worked too slow, so i just make text of the activecell bold
and when clicking the next cell, the bold disappears...
it worked perfectly too !!!
but i notice now that my adding new row vba is stopping...
to make the activecell highlight in bold, i used :
Private Sub Worksheet_Activate()
Set r = ActiveCell
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
With r
.Font.Bold = False
End With
With Target
.Font.Bold = True
End With
Set r = Target
(...)
Display More
is the worksheet activate event the reason of my adding new row vba not working,
in that vba this is the code :
Range("A" & nieuwerij - 1 & ":CQ" & nieuwerij - 1).Select
Selection.Copy
Range("A" & nieuwerij).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("A" & nieuwerij & ":CQ" & nieuwerij).SpecialCells(xlCellTypeConstants).ClearContents
the error appears on line 4 : "selection.pastespecial paste ...
what has changed that i don't understand ?