Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2014, 12:52 AM
Catty Catty is offline How to hide an activeX label in word 2010 Windows 7 32bit How to hide an activeX label in word 2010 Office 2010 32bit
Advanced Beginner
How to hide an activeX label in word 2010
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default How to hide an activeX label in word 2010

Hi,

I'm trying to hide a few of labels when printing if the label caption/text is "Y/N". Below is the code I'm using:

Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

If lbl_Slave1 = "Y/N" Then
Me.lbl_Slave1.Visible = False
Else
Me.lbl_Slave1.Visible = True
End If

End Sub
But obviously this is not working. Any ideas where I'm going wrong or how to best do this?

Thanks!
Reply With Quote
  #2  
Old 01-13-2014, 02:52 PM
fumei fumei is offline How to hide an activeX label in word 2010 Windows 7 64bit How to hide an activeX label in word 2010 Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

First off, ActiveX labels in the document do not have a .Visible property.

Secondly you have Cancel and PrintCount as NON-optional parameters, and you have given them no value in the procedure.
Reply With Quote
  #3  
Old 01-13-2014, 11:15 PM
Catty Catty is offline How to hide an activeX label in word 2010 Windows 7 32bit How to hide an activeX label in word 2010 Office 2010 32bit
Advanced Beginner
How to hide an activeX label in word 2010
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default

Hi Fumei,

Thanks for the response. Could you please point me in the right direction if you have an idea on how I can go about accomplishing my mission?

Thanks.
Reply With Quote
  #4  
Old 01-14-2014, 08:08 AM
gmaxey gmaxey is offline How to hide an activeX label in word 2010 Windows 7 32bit How to hide an activeX label in word 2010 Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Catty,

You might make the label caption equal to "" during the print process and then restore it to the y/n state.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 01-14-2014, 02:57 PM
fumei fumei is offline How to hide an activeX label in word 2010 Windows 7 64bit How to hide an activeX label in word 2010 Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

While making the Caption = "" removes the text, if you also need to make the dimensions small (so the label is no longer taking up space) you can change the Height and Width properties.
Code:
 If lbl_Slave1.Caption = "Y/N" Then
Code:
With lbl_Slave1
   .Height = 1
   .Width = 1
   .Caption = ""
End With
End If 
It is unclear when and how you are going to fire your procedure.
Reply With Quote
  #6  
Old 01-14-2014, 03:01 PM
fumei fumei is offline How to hide an activeX label in word 2010 Windows 7 64bit How to hide an activeX label in word 2010 Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

What the heck. I have tried FIVE times to get proper code blocks. I have used Advanced. I have used copying to Notepad. It insists on ADDING extra code tags (closing after my "Then") and changing font....even though I did NO font changes whatsoever. Even when I click Edit and remove the extra code tags, it puts them back in again.

I give up.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide an activeX label in word 2010 Word 2010 Manage Styles dialog and 'Hide Until Used' Pluviophile Word 10 11-25-2013 12:40 PM
Userform label bordercolor not controllable if click label skarden Word VBA 1 09-29-2013 07:27 PM
How to hide an activeX label in word 2010 What label option is being used in this Word doc? boy33 Mail Merge 1 01-30-2013 03:11 PM
Word Form/ActiveX drop down menu/value in a different field AMackenzieFFCU Word VBA 1 01-14-2013 07:48 AM
Need help with placeholder text in ActiveX controls in Word mhellerstein Office 0 11-02-2011 12:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:12 PM.


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