Prev Previous Post   Next Post Next
  #1   Report Post  
Mark1
 
Posts: n/a
Default VBA problem

Can anybody tell me why variable g is causing an error when it gets to
order1:=g? Why wouldn't d be causing the same error? Thanks!

d = InputBox("What cell do you want to sort by on this page?", Xpos:=9000,
Ypos:=7000)
g = InputBox("How do you want to sort? Please answer either" & Chr(13) & _
"with xlAscending or xlDescending", Xpos:=9000, Ypos:=7000)

If d = "" Then
GoTo Option1
End If

On Error GoTo Option2

ActiveSheet.Range(a, c).EntireRow.Select
Selection.Sort Key1:=Range(d), order1:=g
 
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
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Baffling formula problem Ken Schmidt Excel Discussion (Misc queries) 2 December 21st 04 07:52 AM
Paper Tray selection Problem, Michael Hoffmann Excel Discussion (Misc queries) 4 December 3rd 04 09:08 PM
Custom Type Charts Problem Reetesh B. Chhatpar Excel Worksheet Functions 0 November 23rd 04 10:55 AM
label problem Raven Maniac Excel Worksheet Functions 5 November 10th 04 10:10 PM


All times are GMT +1. The time now is 04:34 PM.

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"