May 24, 2021 #1 busy_bee Programmer Oct 9, 2020 14 US I have the following code to delete a range of cells and shift cells up. Code: Set objRange = ws1.Range("C4","C7") objRange.Delete xlToUp However, it is giving me an error. Can I get the correct code for this operation?
I have the following code to delete a range of cells and shift cells up. Code: Set objRange = ws1.Range("C4","C7") objRange.Delete xlToUp However, it is giving me an error. Can I get the correct code for this operation?
May 24, 2021 Thread starter #2 busy_bee Programmer Oct 9, 2020 14 US I have figured out the solution. Code: const xlUp = -4162 Set objRange = ws1.Range("C4:C7") objRange.Delete xlUp Upvote 0 Downvote
I have figured out the solution. Code: const xlUp = -4162 Set objRange = ws1.Range("C4:C7") objRange.Delete xlUp