LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Query on Control Source in Userform Textbox

Hi, everybody -

BOY O' BOY --- I continue to improve our agency's Income Calculation
Tool with the help of numerous people here. I have a slight problem in
one of my VB codings. My particular problem is related to the portion
of the code that is seperated and in brackets. I have created a
specific userform that includes a number of textboxes where the user
enter data that feeds over to the spreadsheet's Data Entry Sheet. The
Data Entry Sheet then calculates the family's income and rent whish
then feeds over to all of the applicable program letters and
worksheets.

Within the userform, I have a data entry textbox with the Control
Source set to enter the data entered into the textbox to feed into the
field Data_Entry_Sheet!B75. What's supposed to happen is: if
Data_Entry_Sheet!b75 is populated, via the userform's textbox,
Worksheet 8 should be printed out - if the field is empty, Worksheet 8
should not be printed. WHAT IS HAPPENING --- everytime I run the code,
even when Data_Entry_Sheet!b75 is empty, the worksheet prints out!!!

Sorry for the extended query. I'm hoping one of the experts here can
give me a clue why this is happening and how I can fix the code.

CODE BELOW:

Sub PrintTTPWorksheet() 'Print S8 Annuals and Interims'
PaperWarning = ktMsgBox("PRIOR TO PRINTING ANY WORKSHEETS:" & vbCrLf &
"Please verify whether any houshold members qualify" & vbCrLf & "for
the Earned Income Disregard. If you have verified all" & vbCrLf &
"household members, press YES to continue the printing" & vbCrLf &
"process." & vbCrLf & "If you need to enter additional earned income
disregard" & vbCrLf & "data, press NO and enter the data." _
, vbYesNo + vbCritical, "REMEMBER TO CHECK ALL HOUSEHOLD MEMBERS FOR
FOR MEID" _
, PromptColor:=vbRed _
, BackColor:=&HFFCC00 _
, Chime:=True _
, FontName:="TAHOMA" _
, FontSize:=20 _
, WaitSecond:=0 _
, ChimeColor:=&H808000)

If PaperWarning = 6 Then
[A1].Select
Sheet3.Select
Sheet3.PrintOut
Sheet3.Select
Sheet3.PrintOut
Sheet1.Select
Sheet1.PrintOut
Sheet4.Select
Sheet4.PrintOut
Sheet14.Activate
With Sheet14
..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
..Shapes("Text Box 3").Select
Selection.Characters.Text = ""
..Shapes("Text Box 4").Select
Selection.Characters.Text = "P"
..PrintOut
..Shapes("Text Box 4").Select
Selection.Characters.Text = ""
..Range("A12").Select
Sheet2.Select


[[[If ("Data_Entry_Sheet!B75") "" Then
Sheet8.PrintOut]]]


PaperWarning = ktMsgBox("Insert your envelopes now. Click YES to print
your envelopes." & vbCrLf & "Otherwise, click NO to Cancel." _
, vbYesNo + vbCritical, "PREPARING TO PRINT YOUR ENVELOPES FOR SECTION
8 AMENDMENTS" _
, PromptColor:=vbRed _
, BackColor:=&HFFCC00 _
, Chime:=False _
, FontName:="TAHOMA" _
, FontSize:=16 _
, WaitSecond:=0 _
, ChimeColor:=&H808000)
If PaperWarning = 6 Then
Sheet24.PrintOut
Sheet25.PrintOut
PaperWarning = ktMsgBox("If this is a MOVE, check MLS to see if there
is already an Alternate Address entered. Click YES if there is no
Alternate Address to remove. Otherwise, click NO and remove the
Alternate Address." _
, vbYesNo + vbCritical, "CHECK MLS FOR AN ALTERNATE ADDRESS" _
, PromptColor:=vbRed _
, BackColor:=&HFFCC00 _
, Chime:=True _
, FontName:="TAHOMA" _
, FontSize:=16 _
, WaitSecond:=10 _
, ChimeColor:=&H808000)
If PaperWarning = 6 Then
[A1].Select
..Protect "led52not"
End If
End If
End If
End With
End If
End Sub

THANKS FOR ALL THE HELP!!!!!

Golf
 
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
Syntax for control source in combo box control dhstein Excel Discussion (Misc queries) 1 August 12th 09 05:38 PM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Autofill userform textbox Mark Excel Programming 1 November 28th 03 12:57 PM
hide a textbox on a userform? Bill Lunney Excel Programming 2 July 31st 03 08:57 AM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 06:02 AM.

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"