Hi
Is it at all possible to get the name (e.g cell A3 etc) that is selected by the cursor/mouse.
I want to be able to do this using VBA but cannot find out how to do this.
Thanks in advance everyone
Dave
Hi
Is it at all possible to get the name (e.g cell A3 etc) that is selected by the cursor/mouse.
I want to be able to do this using VBA but cannot find out how to do this.
Thanks in advance everyone
Dave
Hey its ok, i got it.
I just wanted to copy the info in the selected cell and place it into an input box.
If any one was interested, then here's the code.......
'This code gets the selected cell, copies it and places it in the input box
Dim selectedCell As Range
Set selectedCell = Selection
'MsgBox selectedCell.Address
'copy the range
selectedCell.Copy
'Place the text into the default property
Dim varInput As String
varInput = InputBox("What do you want to search for?", , selectedCell)
Thanks
Dave
ActiveCell.Address
--
Regards,
Tom Ogilvy
"David494" <[email protected]> wrote in
message news:[email protected]...
>
> Hi
>
> Is it at all possible to get the name (e.g cell A3 etc) that is
> selected by the cursor/mouse.
>
> I want to be able to do this using VBA but cannot find out how to do
> this.
>
> Thanks in advance everyone
>
> Dave
>
>
> --
> David494
> ------------------------------------------------------------------------
> David494's Profile:
http://www.excelforum.com/member.php...o&userid=24482
> View this thread: http://www.excelforum.com/showthread...hreadid=391783
>
The VBA command is
thiscell.address
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758
"David494" wrote:
>
> Hi
>
> Is it at all possible to get the name (e.g cell A3 etc) that is
> selected by the cursor/mouse.
>
> I want to be able to do this using VBA but cannot find out how to do
> this.
>
> Thanks in advance everyone
>
> Dave
>
>
> --
> David494
> ------------------------------------------------------------------------
> David494's Profile: http://www.excelforum.com/member.php...o&userid=24482
> View this thread: http://www.excelforum.com/showthread...hreadid=391783
>
>
I Believe ThisCell wasn't introduced until xl2002. ActiveCell would be the
more general choice I would think.
--
Regards,
Tom Ogilvy
"galimi" <[email protected]> wrote in message
news:[email protected]...
> The VBA command is
>
> thiscell.address
> --
> http://HelpExcel.com
> 1-888-INGENIO
> 1-888-464-3646
> x0197758
>
>
> "David494" wrote:
>
> >
> > Hi
> >
> > Is it at all possible to get the name (e.g cell A3 etc) that is
> > selected by the cursor/mouse.
> >
> > I want to be able to do this using VBA but cannot find out how to do
> > this.
> >
> > Thanks in advance everyone
> >
> > Dave
> >
> >
> > --
> > David494
> > ------------------------------------------------------------------------
> > David494's Profile:
http://www.excelforum.com/member.php...o&userid=24482
> > View this thread:
http://www.excelforum.com/showthread...hreadid=391783
> >
> >
thanks guys, always good to hear about other ways of doing things.
Dave
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks