I will be very impressed if any of you experts can crack this code!

sbrazil

New Member
Joined
Nov 23, 2009
Messages
30
Hi,

I was wandering if someone could help me with codes.

I want to install a code which will enable me to widen the data validation dropdown menu temporarily to 80, but also have a zoom in to 130. I want it so it widens and zooms when I click on the dropdown menu, but then goes back to it's normal size once I click elsewhere.


I would be very, very impressed if someone could crack this one.

Thankyou,
speak again soon,
Scott <!-- / message -->
<!-- / message -->
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi smitty,
Wow that was a quick response!

That is the exact page I found and realised it can be done. But I don't understand - This is two seperate codes, so how do I enter them?

Do I need two seperate windows, or both in one window?

Or one code which does both things?

Thanks,
Scott
 
Upvote 0
You could combine them like this:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Address(0,0) = "A1" Then
       Target.Columns.ColumnWidth = 80
       ActiveWindow.Zoom = 130
   Else
       Columns(1).ColumnWidth = 8.5
       ActiveWindow.Zoom = 100
   End If
End Sub
Which works if your validation range is in cell A1.
HTH
 
Upvote 0
Weaver,
your a legend! You have come the closest to getting it for me so far!!!!!!!!!

I just tried it and it worked for A1.

But, how do I make it so it is for all data validation dropdown menus on the page?

Almost there, would appreciate your extra bit of help on this one.

Thanks,
Scott
 
Upvote 0
Weaver,

Pleasebe sure to read my other post above, but basically, yes this is working, but I want it to work on all data validation cells on the page, and I want those cells to go back to their original size once i click on non-data validation cells.

does this make sense?

I have tried combining your macros and changing slightly, but it is beyond my knowledge sorry.

Thanks mate,
Scott
 
Upvote 0
Hi Weaver - great thanks mate, but how do I make it work for all of the data validated cells on the page?

Any ideas?

Very impressed that you are able to do this for me so far - honestly!

Thanks mate,
Scott
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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