Re: Inputbox
From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 02/19/04
- Next message: David Fixemer: "Conditional Formatting between different workbooks (see details..)"
- Previous message: MIke: "Code writing:Where to start ?"
- In reply to: sa***: "Inputbox"
- Next in thread: JE McGimpsey: "Re: Inputbox"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 14:01:27 -0500
Dim Rng as range
Dim sh as Work***
On error resume Next
set rng = application.inputbox(Prompt:=prompt...Type:=8)
On Error goto 0
If not rng is Nothing then
for each sh in Worksheets
sh.Activate
range(rng.address).Select
Next
End if
-- Regards, Tom Ogilvy "sa***" <anonymous@discussions.microsoft.com> wrote in message news:12fc301c3f712$dff34540$a001280a@phx.gbl... > Hi All, > > I am using Excels inputbox in VBA to obtain a cell > reference. See the following > > Dim Rng as range > set rng = application.inputbox(Prompt:=prompt...Type:=8) > rng.select > > Say rng was C8 > > What I want to do is to select C8 on each *** using a > for each statement. > > When I try it always slects C8 in sheet1 where the user > originally selected the rng. How can I generalise this so > it selects rng on the active***. > > Thanks for your help. > > Regards > > Sa***
- Next message: David Fixemer: "Conditional Formatting between different workbooks (see details..)"
- Previous message: MIke: "Code writing:Where to start ?"
- In reply to: sa***: "Inputbox"
- Next in thread: JE McGimpsey: "Re: Inputbox"
- Messages sorted by: [ date ] [ thread ]