Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-30-2012, 08:23 PM
joatmon joatmon is offline Capture a Font in a Variable Windows 7 64bit Capture a Font in a Variable Office 2010 64bit
Novice
Capture a Font in a Variable
 
Join Date: May 2012
Posts: 14
joatmon is on a distinguished road
Default

I figured it out. Here is the code for anyone who might stumble on this:

Code:
Private Sub UserForm_Initialize()
    
    Dim myFont As String
    
    'Set fonts on controls based on version of Excel
    If Application.Version > 12 Then 'this is for Excel 2010
        myFont = "Chiller"
    Else: myFont = "Arial" 'older versions of Excel
    End If
    
    'Set the various controls
    Me.Label1.Font.Name = myFont
    'etc
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to capture start and ending Ref. Nos. in an array KIM SOLIS Excel 5 09-07-2011 07:43 AM
Variable fields? Emalee77 PowerPoint 0 01-30-2011 05:58 PM
Capture a Font in a Variable Variable Table_Array in VLOOKUP pdab09 Excel 3 11-23-2010 05:28 AM
capture sender's contact to 'Contacts Folder' gianimpact Outlook 0 02-09-2010 07:56 AM
Inputting variable data axy Word 0 09-08-2009 04:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft