Selasa, 17 September 2013

Re: [ExcelVBA] Enlarging text in drop down lists

 

Dear Steven

Apologies, the code should go into the Worksheet object where the zoom effect is required.

The Workbook does not have a SelectionChange event so you would never have hit a breakpoint there.

Regards

Derek Turner
+++




From: "steven.eckley@accenture.com" <steven.eckley@accenture.com>
To: ExcelVBA@yahoogroups.com
Sent: Tuesday, 17 September 2013, 7:22
Subject: RE: [ExcelVBA] Enlarging text in drop down lists

 
Hi Derek, I tried using the code below, and placed it in the Thisworkbook object as I could not find it under the modules section. Unfortunately the text in the drop down list does not increase in size and when I try to step through I can't seem to do so and and there is no error message. My guess is in placing the code in the wrong place, I only have a thisworkbook object and not module. Is this correct?

[cid:image003.jpg@01CEB376.9A954630]

From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf Of Derek Turner
Sent: 15 September 2013 1:06 PM
To: ExcelVBA@yahoogroups.com
Subject: Re: [ExcelVBA] Enlarging text in drop down lists

Dear Steven

I think this is what you want if you have made dropdowns with menu item Data, Data Validation, Allow= List.

Put it in the Thisworkbook module.

It enlarges the whole screen so is a bit jumpy but it does the trick.
Also it assumes that your normal zoom setting is 100% .
Alter the ZOOM_NORMAL * 2.5 to your own taste.
Notice that if you are stepping through the code and do a Reset for any reason that Application.EnableEvents = False is still set.

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim nValidationType As Long
Const ZOOM_NORMAL As Long = 100
Const ZOOM_LARGE As Long = ZOOM_NORMAL * 2.5
'
Application.EnableEvents = False
On Error Resume Next
nValidationType = Target.Validation.Type
On Error GoTo 0
With ActiveWindow
If Not nValidationType = xlValidateList Then
If Not .Zoom = ZOOM_NORMAL Then .Zoom = ZOOM_NORMAL
Else
If Not .Zoom = ZOOM_LARGE Then .Zoom = ZOOM_LARGE
End If
End With
Application.EnableEvents = True
End Sub

Regards

Derek Turner
+++

________________________________
From: steven.eckley <steven.eckley@accenture.com<mailto:steven.eckley@accenture.com>>
To: ExcelVBA@yahoogroups.com<mailto:ExcelVBA@yahoogroups.com>
Sent: Friday, 13 September 2013, 16:55
Subject: [ExcelVBA] Enlarging text in drop down lists

Derek, good thing you ask I generally limit my interaction on the groups as I don't really have any scripting skills. One think I have been trying to get done is enlarge the size of the text in a dropdown list when it is selected. I have about4 dropdown lists in a sheet, the text so small it is difficult to select the correct one. If you have any suggestions on how to get the font size of the text enlarged when scrolling through the drop down list it will help me out a lot.

________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

__________________________________________________________

www.accenture.com

[Non-text portions of this message have been removed]



__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (11)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar