VBE, Visual Basic Editor in Excel 2000

Location: http://www.mvps.org/dmcritchie/excel/vbeditor.htm      
Home page: http://www.mvps.org/dmcritchie/excel/excel.htm
[View without Frames]
Hi Joseph,
Adding to Tom's answer,  a frequently overlooked option
is the ability supply a default value.  Two examples below
the second  is the address of the activecell + 3 columns.

Set dest = Application.InputBox("Where to now", , _
   "A8", Type:=8)

Set dest = Application.InputBox("Where to now", , _
   ActiveCell.Offset(0, 3).Address(0, 0), Type:=8)

If you are using XL2000, the Visual Basic Editor has some
very helpful  Richt Click options:

Position Cursor on MsgBox
       "Quick Info", which gets a tool tip for wherever cursor is
       "Definition", which gives formula information

Position Cursor within parens of MsgBox
      "Parameter Information"  to see the available parameters
Since your question was about macros it really should have been
posted to   microsoft.public.excel.programming

HTH,
David McRitchie,  Microsoft MVP - Excel   (site changed 2000-04-15)
My Excel Macros:   http://www.mvps.org/dmcritchie/excel/excel.htm

Tom Ogilvy  wrote in message news:OgZ7MwnFAHA.214@cppssbbsa02.microsoft.com...
> Use
> ans = InputBox("Where to now")
>
> If you want the user to select a cell with the mouse you would use
>
> Sub pickrange()
> Dim dest As Range
> On Error Resume Next
> Set dest = Application.InputBox("Where to now", Type:=8)
> On Error GoTo 0
> If Not dest Is Nothing Then
>   dest.Select
> Else
>   MsgBox "You clicked cancel"
>   Exit Sub
> End If
> End Sub

Related

(placeholder)
You are one of many distinguished visitors who have visited my site here or in a previous location  since this page was created on September 4, 2000. 

Visit [my Excel home page]   [Index page]   [Excel Onsite Search]   [top of this page]

Please send your comments concerning this web page to: David McRitchie send email comments


Copyright © 1997 - 2004,  F. David McRitchie,  All Rights Reserved