BenRichards
New Member
- Joined
- Apr 7, 2014
- Messages
- 41
Hi! I'm using Excel 2013. My problem:
I have an order form in which the user can press a command button to create new sheets, which are copies of the original. In the original, depending on the user's selections, some rows are hidden. For this reason an image is moved about, so that it's always visible and not blocking anything else.
In the original sheet, everything works fine, and it used to work in the copied sheets as well, but now for some reason the image will not move in those copied sheets. I checked back into older versions and it was working fine back then, but so much has been updated that I have to have this version fixed.
For instance:
ElseIf TextBox1.Value = "2" Then
Rows("105:228").Hidden = True
ActiveSheet.Pictures("Picture 2").Top = 997
ActiveSheet.Pictures("Picture 2").Left = 13
This bit of code will hide the correct rows, but will not relocate the picture.
I've tried copying the lines that should move the pic into other sections of the code, such as when a certain checkbox is clicked, but for some reason it will not budge. And when I try the original sheet, everything works fine. If I do some selections on the original sheet, so that the pic is moved, then make a copy (so that the pic will be in another spot), there is no diffence.
Nothing in the code says that those commands should work only with a sheet whose name is the original one. "ActiveSheet" is used because of this (and as I said, the rows hide as they should).
I have an order form in which the user can press a command button to create new sheets, which are copies of the original. In the original, depending on the user's selections, some rows are hidden. For this reason an image is moved about, so that it's always visible and not blocking anything else.
In the original sheet, everything works fine, and it used to work in the copied sheets as well, but now for some reason the image will not move in those copied sheets. I checked back into older versions and it was working fine back then, but so much has been updated that I have to have this version fixed.
For instance:
ElseIf TextBox1.Value = "2" Then
Rows("105:228").Hidden = True
ActiveSheet.Pictures("Picture 2").Top = 997
ActiveSheet.Pictures("Picture 2").Left = 13
This bit of code will hide the correct rows, but will not relocate the picture.
I've tried copying the lines that should move the pic into other sections of the code, such as when a certain checkbox is clicked, but for some reason it will not budge. And when I try the original sheet, everything works fine. If I do some selections on the original sheet, so that the pic is moved, then make a copy (so that the pic will be in another spot), there is no diffence.
Nothing in the code says that those commands should work only with a sheet whose name is the original one. "ActiveSheet" is used because of this (and as I said, the rows hide as they should).