The button is in sheet Dashboard, when I click the button and it returns the error.Please Login or Register to view this content.
What does it mean and how to fix it?
Thanks.
The button is in sheet Dashboard, when I click the button and it returns the error.Please Login or Register to view this content.
What does it mean and how to fix it?
Thanks.
https://stackoverflow.com/questions/...1%20characters.
apparently, there could be a cell with a very long string in it ???
What happens if you do it in 2 steps?
Please Login or Register to view this content.
Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Please Login or Register to view this content.
You can reference a Range object in several ways. One is referencing starting and ending cells by reference. Your Range object is a certain range in the Temp worksheet. Since the Dashboard sheet is active at this point, using the codeit tried to create a Range object on the Temp sheet, but from cells in the Dashboard sheet (or active sheet). This is obviously impossible, and that's why you were getting an error. The actual range reference would be the code:Please Login or Register to view this content.
, but it is very long and inconvenient. Therefore, the construction With ... End With is used, as jindon has shown. Note the dots in front of Cells, they will make the range's start and end cells reference the Temp sheet.Please Login or Register to view this content.
Another way to refer to Range is by addressing. The following code will be correct, even though Cells points to cells in the active worksheet. But we only get the address.Since the start and end cells are constant, it will be more readable to use addresses this way:Please Login or Register to view this content.
ArtikPlease Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks