BaldyMcFatFat
Technical User
I have an issue where I need a range to have a variable figure in one of the positions. This variable is set when running the macro by an input box. I am trying to learn all this VBA stuff with no actual programming background and I have been able to do most of it with the help of websites such as this and a couple books; however, I have been unsuccessful (so far) to find an answer to this issue. the codding is written below:
ActiveCell.Offset(-Y, 1).Range("A1:A14").Select
Selection.Cut
ActiveCell.Offset(0, 1).Range("A1:A14").Select
ActiveSheet.Paste
ActiveCell.Offset(-1, 0).Range("A1").Select
Selection.Copy
ActiveCell.Offset(0, -2).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1:C14").Select
Application.CutCopyMode = False
This is just a small section of the macro I am working with.
The -Y in the first line is one of the areas I have been able to work with the input box variable, but the one hold up I am finding, is how to get the range selected to also be determined by the input box value. All I need is the "A14" and "C14" to be able to change based on the value placed in the Input Box at the beginning of the macro.
I am working on Excel 03 and Windows XP if that maes any difference. Any help would be greatly appreciated. And please excuse any mistakes or stupid errors I may have made in my logic here. As always, let me know if there are any questions to help me clarify my ranting.
Baldy McFatfat
"If at first you don't succeed, skydiving is not for you.
ActiveCell.Offset(-Y, 1).Range("A1:A14").Select
Selection.Cut
ActiveCell.Offset(0, 1).Range("A1:A14").Select
ActiveSheet.Paste
ActiveCell.Offset(-1, 0).Range("A1").Select
Selection.Copy
ActiveCell.Offset(0, -2).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1:C14").Select
Application.CutCopyMode = False
This is just a small section of the macro I am working with.
The -Y in the first line is one of the areas I have been able to work with the input box variable, but the one hold up I am finding, is how to get the range selected to also be determined by the input box value. All I need is the "A14" and "C14" to be able to change based on the value placed in the Input Box at the beginning of the macro.
I am working on Excel 03 and Windows XP if that maes any difference. Any help would be greatly appreciated. And please excuse any mistakes or stupid errors I may have made in my logic here. As always, let me know if there are any questions to help me clarify my ranting.
Baldy McFatfat
"If at first you don't succeed, skydiving is not for you.