LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Scrolling

Tom,

My code is now

Set rng = Range("A1:I" & Range("a65536").End(xlUp).Row)
rng.Select

Thank you for the info about the immediate window, Everything I do I
have to learn so this will make it a lot easer having a test pad, I
cant work out why it works now and why it didnt work before but ill
keep testing it as at the moment it works perfectly, I'll post my sub
in full below for the benefit of others reading this.

Many thanks again,

Duncan

Private Sub Report_Click()
Sheets("sheet1").Select
Dim rng As Range
Dim LroW As Range



Set rng = Range("A1:I" & Range("a65536").End(xlUp).Row)



If regTrail <= "" Then
MsgBox "must input a registration number!"
Exit Sub
End If

If Not IsNumeric(regTrail.Value) Then
MsgBox "Registration number must be a Numerical Value, Please retry"
Exit Sub
End If

Range("A1").End(xlDown).Offset(1, 0).Select
ActiveCell.Select

Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=regTrail.Value
UserForm1.Hide

Select Case MsgBox("Print?", vbYesNo)

Case vbYes
Sheet1.Activate
rng.Select
Selection.PrintOut Copies:=1, Collate:=True

Selection.AutoFilter
UserForm1.Show
regTrail.Value = ""
regTrail.SetFocus
Exit Sub

Case vbNo
Selection.AutoFilter
UserForm1.Show
regTrail.Value = ""
regTrail.SetFocus

Exit Sub
End Select
Sheets("sheet1").Select

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
Excel- smooth scrolling (instead of 'snap' scrolling) scooterbaga Setting up and Configuration of Excel 2 April 24th 08 02:16 PM
Vertical scrolling...jumps rather than smooth scrolling Miller Man Excel Discussion (Misc queries) 2 January 23rd 07 07:11 PM
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel, even 2007 beta [email protected] Excel Discussion (Misc queries) 2 July 21st 06 01:21 AM
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel 2003 [email protected] Excel Discussion (Misc queries) 0 May 12th 06 03:15 AM
scrolling - help Cin Excel Discussion (Misc queries) 0 April 21st 05 08:10 PM


All times are GMT +1. The time now is 02:58 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"