question

KinkTobias-8002 avatar image
0 Votes"
KinkTobias-8002 asked

VBA runtime error 1004 when x1

Hey guys,

I have an important question, because when I type in something like

last = ActiveSheet.Cells(Rows.Count, 9).End(x1Up).Row to select everything until the last cell, then I get the runtime error 1004, even though I did everything exactly the same like the Yotuuber did in his video that I was watching.

But also commands like
.Borders(xlInsideHorizontal).LineStyle = x1Dash
.Borders(xlInsideVertical).LineStyle = x1Continuous
.Borders(xlEdgeBottom).LineStyle = x1Double

just don´t work. Nothing happens.

Or even the follwing command also brings me a runtime error 1004.

With Range("E1:F3")
.Merge
.Value = "Neuer Text"
.HorizontalAlignment = x1Center
.VerticalAlignment = x1Center


I have the suspicion that i has to do with those x1(..) things, does someone maybe have the same problem or knows a solution? Maybe a setting which disables those commands?

You would help me so much!

Toby

office-vba-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers