Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Maintaining Text Box Font Setting through VB

Hi, Everyone -

I've run into this issue, and I can seem to figure it out. In my
spreadsheet, I've included several text boxes at the bottom of the
pages. The VB code I also have included is, when the pages are
printed, alternately place a "P" in the text boxes. Then I formatted
the text boxes to use WingDings II so that checkmarks SHOULD appear in
the boxes. I've also included code that would (1) unprotect the sheet;
(2) print the pages with the text boxes; and (3) reprotect the sheet.
What keeps on happening is that, for some unknown reason (at least to
me), the font in the text boxes keeps returning to Calibri before
printing so all that shows in the boxes are "P"s. I would then go in,
unprotect the sheet, change the font in the boxes and resave the
workbook. The same thing will happen. What I'm wondering is whether
there is a way I could modify my code so that the font setting, in the
text boxes, would keep at WingDing II and not change? THANKS FOR THE
CONTINUED HELP!!! Frank

I've attached my code below:


Sub PrintLRPHAmendment() 'Print completed PH Amendment'
Sheet17.Activate
With Sheet17
..Unprotect "led52not"
..Shapes("Text Box 1").Select
Selection.Characters.Text = "P"
..Shapes("Text Box 2").Select
Selection.Characters.Text = ""
..Shapes("Text Box 3").Select
Selection.Characters.Text = ""
..Shapes("Text Box 4").Select
Selection.Characters.Text = ""
..PrintOut
..Shapes("Text Box 1").Select
Selection.Characters.Text = ""
..Shapes("Text Box 2").Select
Selection.Characters.Text = "P"
..PrintOut
..Shapes("Text Box 2").Select
Selection.Characters.Text = ""
..Shapes("Text Box 3").Select
Selection.Characters.Text = "P"
..PrintOut

If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then

..Shapes("Text Box 3").Select
Selection.Characters.Text = ""
..Shapes("Text Box 4").Select
Selection.Characters.Text = "P"
..PrintOut
..Protect "led52not"
End If

paperwarning = MsgBox("Insert your envelope now. Click YES to print
your envelopes. Otherwise, click NO to Cancel.", vbYesNo, "Preparing
to print envelopes for your LRPH Amendments")
If paperwarning = 7 Then 'if user answers NO'
Sheets("lrph_amendment").Protect ("led52not")
..Range("A12").Select
Sheets("data_entry_sheet").Select
[a1].Select
..Protect "led52not"
'Other protection/hiding code here'
Exit Sub
Else
End If

If paperwarning = 6 Then 'if answer is to print out envelopes
Sheet24.PrintOut

If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then
Sheet25.PrintOut

End If
..Range("A12").Select
Sheet2.Select
[a1].Select
..Protect "led52not"
End If
End With
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Maintaining Text Box Font Setting through VB

Will the printer accept Wingdings?


"golf4" wrote in message
...
Hi, Everyone -

I've run into this issue, and I can seem to figure it out. In my
spreadsheet, I've included several text boxes at the bottom of the
pages. The VB code I also have included is, when the pages are
printed, alternately place a "P" in the text boxes. Then I formatted
the text boxes to use WingDings II so that checkmarks SHOULD appear in
the boxes. I've also included code that would (1) unprotect the sheet;
(2) print the pages with the text boxes; and (3) reprotect the sheet.
What keeps on happening is that, for some unknown reason (at least to
me), the font in the text boxes keeps returning to Calibri before
printing so all that shows in the boxes are "P"s. I would then go in,
unprotect the sheet, change the font in the boxes and resave the
workbook. The same thing will happen. What I'm wondering is whether
there is a way I could modify my code so that the font setting, in the
text boxes, would keep at WingDing II and not change? THANKS FOR THE
CONTINUED HELP!!! Frank

I've attached my code below:


Sub PrintLRPHAmendment() 'Print completed PH Amendment'
Sheet17.Activate
With Sheet17
.Unprotect "led52not"
.Shapes("Text Box 1").Select
Selection.Characters.Text = "P"
.Shapes("Text Box 2").Select
Selection.Characters.Text = ""
.Shapes("Text Box 3").Select
Selection.Characters.Text = ""
.Shapes("Text Box 4").Select
Selection.Characters.Text = ""
.PrintOut
.Shapes("Text Box 1").Select
Selection.Characters.Text = ""
.Shapes("Text Box 2").Select
Selection.Characters.Text = "P"
.PrintOut
.Shapes("Text Box 2").Select
Selection.Characters.Text = ""
.Shapes("Text Box 3").Select
Selection.Characters.Text = "P"
.PrintOut

If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then

.Shapes("Text Box 3").Select
Selection.Characters.Text = ""
.Shapes("Text Box 4").Select
Selection.Characters.Text = "P"
.PrintOut
.Protect "led52not"
End If

paperwarning = MsgBox("Insert your envelope now. Click YES to print
your envelopes. Otherwise, click NO to Cancel.", vbYesNo, "Preparing
to print envelopes for your LRPH Amendments")
If paperwarning = 7 Then 'if user answers NO'
Sheets("lrph_amendment").Protect ("led52not")
.Range("A12").Select
Sheets("data_entry_sheet").Select
[a1].Select
.Protect "led52not"
'Other protection/hiding code here'
Exit Sub
Else
End If

If paperwarning = 6 Then 'if answer is to print out envelopes
Sheet24.PrintOut

If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then
Sheet25.PrintOut

End If
.Range("A12").Select
Sheet2.Select
[a1].Select
.Protect "led52not"
End If
End With
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Maintaining Text Box Font Setting through VB

On May 21, 3:11*pm, "JLGWhiz" wrote:
Will the printer accept Wingdings?

"golf4" wrote in message

...



Hi, Everyone -


I've run into this issue, and I can seem to figure it out. In my
spreadsheet, I've included several text boxes at the bottom of the
pages. The VB code I also have included is, when the pages are
printed, alternately place a "P" in the text boxes. Then I formatted
the text boxes to use WingDings II so that checkmarks SHOULD appear in
the boxes. I've also included code that would (1) unprotect the sheet;
(2) print the pages with the text boxes; and (3) reprotect the sheet.
What keeps on happening is that, for some unknown reason (at least to
me), the font in the text boxes keeps returning to Calibri before
printing so all that shows in the boxes are "P"s. I would then go in,
unprotect the sheet, change the font in the boxes and resave the
workbook. The same thing will happen. What I'm wondering is whether
there is a way I could modify my code so that the font setting, in the
text boxes, would keep at WingDing II and not change? THANKS FOR THE
CONTINUED HELP!!! * Frank


I've attached my code below:


Sub PrintLRPHAmendment() 'Print completed PH Amendment'
Sheet17.Activate
With Sheet17
.Unprotect "led52not"
.Shapes("Text Box 1").Select
Selection.Characters.Text = "P"
.Shapes("Text Box 2").Select
Selection.Characters.Text = ""
.Shapes("Text Box 3").Select
Selection.Characters.Text = ""
.Shapes("Text Box 4").Select
Selection.Characters.Text = ""
.PrintOut
.Shapes("Text Box 1").Select
Selection.Characters.Text = ""
.Shapes("Text Box 2").Select
Selection.Characters.Text = "P"
.PrintOut
.Shapes("Text Box 2").Select
Selection.Characters.Text = ""
.Shapes("Text Box 3").Select
Selection.Characters.Text = "P"
.PrintOut


If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then


.Shapes("Text Box 3").Select
Selection.Characters.Text = ""
.Shapes("Text Box 4").Select
Selection.Characters.Text = "P"
.PrintOut
.Protect "led52not"
End If


paperwarning = MsgBox("Insert your envelope now. Click YES to print
your envelopes. Otherwise, click NO to Cancel.", vbYesNo, "Preparing
to print envelopes for your LRPH Amendments")
If paperwarning = 7 Then 'if user answers NO'
Sheets("lrph_amendment").Protect ("led52not")
.Range("A12").Select
Sheets("data_entry_sheet").Select
[a1].Select
.Protect "led52not"
'Other protection/hiding code here'
Exit Sub
Else
End If


If paperwarning = 6 Then 'if answer is to print out envelopes
Sheet24.PrintOut


If Sheets("Data_Entry_Sheet").[H49] = "X" And
Sheets("Data_Entry_Sheet").[k23] = "X" Then
Sheet25.PrintOut


End If
.Range("A12").Select
Sheet2.Select
[a1].Select
.Protect "led52not"
End If
End With
End Sub- Hide quoted text -


- Show quoted text -


Thanks for the response, WingDings does work on the machines and other
sheets within the same workbook. Strange, and can't seem to figure
this ojne out......
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Maintaining Text Box Font Setting through VB


Worksheets("Sheet17").Unprotect "led52not"
With Worksheets("Sheet17") .Shapes("Text Box 2").TextFrame.Characters
.Text = "P"
.Font.Name = "Wingdings 2"
End With
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html





"golf4"
wrote in message
Hi, Everyone -
I've run into this issue, and I can seem to figure it out. In my
spreadsheet, I've included several text boxes at the bottom of the
pages. The VB code I also have included is, when the pages are
printed, alternately place a "P" in the text boxes. Then I formatted
the text boxes to use WingDings II so that checkmarks SHOULD appear in
the boxes. I've also included code that would (1) unprotect the sheet;
(2) print the pages with the text boxes; and (3) reprotect the sheet.
What keeps on happening is that, for some unknown reason (at least to
me), the font in the text boxes keeps returning to Calibri before
printing so all that shows in the boxes are "P"s. I would then go in,
unprotect the sheet, change the font in the boxes and resave the
workbook. The same thing will happen. What I'm wondering is whether
there is a way I could modify my code so that the font setting, in the
text boxes, would keep at WingDing II and not change? THANKS FOR THE
CONTINUED HELP!!! Frank

I've attached my code below:
-snip-
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Maintaining Text Box Font Setting through VB

Thanks, Jim - I really appreciate the help.

"Jim Cone" wrote:


Worksheets("Sheet17").Unprotect "led52not"
With Worksheets("Sheet17") .Shapes("Text Box 2").TextFrame.Characters
.Text = "P"
.Font.Name = "Wingdings 2"
End With
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html





"golf4"
wrote in message
Hi, Everyone -
I've run into this issue, and I can seem to figure it out. In my
spreadsheet, I've included several text boxes at the bottom of the
pages. The VB code I also have included is, when the pages are
printed, alternately place a "P" in the text boxes. Then I formatted
the text boxes to use WingDings II so that checkmarks SHOULD appear in
the boxes. I've also included code that would (1) unprotect the sheet;
(2) print the pages with the text boxes; and (3) reprotect the sheet.
What keeps on happening is that, for some unknown reason (at least to
me), the font in the text boxes keeps returning to Calibri before
printing so all that shows in the boxes are "P"s. I would then go in,
unprotect the sheet, change the font in the boxes and resave the
workbook. The same thing will happen. What I'm wondering is whether
there is a way I could modify my code so that the font setting, in the
text boxes, would keep at WingDing II and not change? THANKS FOR THE
CONTINUED HELP!!! Frank

I've attached my code below:
-snip-
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining text data format in a pivot table Eric Excel Discussion (Misc queries) 0 September 21st 09 07:33 PM
maintaining text rotation sending sheet to email recipient RayK Excel Worksheet Functions 0 January 13th 09 09:01 PM
Maintaining Text Formatting in a Lookup loscherland Excel Discussion (Misc queries) 2 April 21st 06 04:26 PM
setting ComboBox Control font ts1 Excel Programming 0 September 22nd 05 06:35 PM
Setting the X axis scale/font CLR Charts and Charting in Excel 2 February 13th 05 08:32 PM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"