Weird bug or else I'm missing something?

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).
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,222,246
Messages
6,164,807
Members
451,917
Latest member
WEB78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top