Hej har ett dokument med ett antal kryssrutor men fylller i och nu håller jag på att göra ett macro som avmarkerar alla kryssrutor. Jag har spelat in ett macro men när man kör makrot så kommer felmedelandet " Körfel nr 1004 Egenskapen Value går inte att ange för klassen DrawingObjects.
Här är makrot
Sub Makro2()
'
' Makro2 Makro
'
ActiveSheet.Shapes.Range(Array("Check Box 1", "Check Box 2", "Check Box 32", _
"Check Box 33", "Check Box 4", "Check Box 3", "Check Box 6", "Check Box 5", _
"Check Box 8", "Check Box 7", "Check Box 10", "Check Box 9", "Check Box 12", _
"Check Box 11", "Check Box 14", "Check Box 13", "Check Box 19", "Check Box 20" _
, "Check Box 21", "Check Box 22", "Check Box 23", "Check Box 24", _
"Check Box 25", "Check Box 26", "Check Box 27", "Check Box 28", "Check Box 29" _
, "Check Box 30")).Select
With Selection
.Value = xlOff
.LinkedCell = ""
.Display3DShading = False
End With
End Sub
Men har man bara en kryssruta i taget markerad så fungerar det.
Makro för att avmarkera två stycker kryssrutor
ActiveSheet.Shapes.Range(Array("Check Box 1")).Select
With Selection
.Value = xlOff
.LinkedCell = ""
.Display3DShading = False
End With
ActiveSheet.Shapes.Range(Array("Check Box 2")).Select
With Selection
.Value = xlOff
.LinkedCell = ""
.Display3DShading = False
End With
Vet ni vad detta kan bero på?
/Daniel