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: 39
Default Hidden sheet bleeds through

Hi,
I have a workbook that is about 5.5MB and I'm using a hidden sheet
(sheet7) to populate a userform. The user selects search criteria from
combo boxes on the first userform and then may get a second userform
if the first userform returns too many records. The problem is that
when the first userform is launched (from a worksheet button) the
column on the hidden sheet that contains the employee list "bleeds"
through to the current sheet. A secondary problem is that the userform
doesn't unload. Can anyone give me an idea as to what is happening
here? The initialization code for each form is listed below. Thanks.
James

Private Sub UserForm_Initialize() 'Primary userform
Dim R As Long
CBox3.Enabled = False
CBox4.Enabled = False
Sheets(7).Range("A2:O2").ClearContents
LastRow = Sheets(2).Cells(Rows.Count, 5).End(xlUp).Row
Raw_Data
ChkBx.Value = False
ChkBx_Change
CmdBtn.Enabled = True
For R = 2 To Worksheets(7).Cells(2, 19).End(xlDown).Row
If Worksheets(7).Cells(R, 19).Value < "" Then
CBox1.AddItem Worksheets(7).Cells(R, 19).Value
End If
Next
For R = 2 To Worksheets(7).Cells(2, 17).End(xlDown).Row
If Worksheets(7).Cells(R, 17).Value < "" Then
CBox3.AddItem Worksheets(7).Cells(R, 17).Value
End If
Next
For R = 2 To Worksheets(7).Cells(2, 18).End(xlDown).Row
If Worksheets(7).Cells(R, 18).Value < "" Then
CBox4.AddItem Worksheets(7).Cells(R, 18).Value
End If
Next
ChkBx.Caption = "Print all student records for " & _
Sheets(1).Cells(8, 2).Value & "."
End Sub



Private Sub UserForm_Initialize() 'Secondary userform and command
button click code
Application.EnableEvents = True
TextBox1.Text = "You are about to print " & (LastRow - 3) & " records.
"
End Sub
Private Sub CommandButton1_Click()
On Error Resume Next
Secondary.Hide
Unload Primary
Select Case True
Case OptBtn1
AllRecordsPrint
Case OptBtn2
If Worksheets(Sheets.Count).Name < "Summary" Then
Add_Again
End If
Summary
AddCBX
Case OptBtn3
DoEvents
Unload Secondary
Primary.Show
Turn_Off
Case Else
End Select
Unload Secondary
DoEvents
End Sub
 
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
Message box bleeds when moved on a userform ViViC via OfficeKB.com Excel Programming 2 September 8th 08 02:14 AM
I need my Hidden Rows to stay hidden when I print the sheet. Rosaliewoo Excel Discussion (Misc queries) 2 July 20th 06 07:51 PM
Message Box bleeds when dragged Modell Excel Programming 3 May 23rd 06 09:37 PM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Excel Programming 2 January 10th 04 01:18 AM


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

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

About Us

"It's about Microsoft Excel"