#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Goto Button


I need a button to go to the cell containing what ever I type into A1 on
the same sheet. For example if I type in AF-1 and click the button, it
scrolls jumps to that cell.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467544

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Goto Button


Goo afternoon Optitron

Sub Jump()
a = Range("A1").Value
Range(a).Activate
End Sub

Type the code above into an empty macro module. Once done, draw
button using the forms bar, assign the macro Jump to the button an
that will do the trick. But use the syntax AF1, not AF-1.

HTH

Dominic

--
dominic
-----------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893
View this thread: http://www.excelforum.com/showthread.php?threadid=46754

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Goto Button


Whoops...I meant to say "AF-1" as in; that's the contents of the cell I
want to go to, not cell AF1. Basically I'm trying to get to the name of
a toolbox on a list of 3000 rows without scrolling there.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467544

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Goto Button


Hi Optitron

OK. Take two...!

Sub TryThisInstead()
a = Range("A1").Value
Cells.Find(What:=a).Activate
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=467544

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Goto Button

Public Sub FindValue()
Dim wks As Worksheet

Set wks = ActiveSheet

wks.Cells.Find(wks.Range("A1").Value, wks.Range("A1")).Select
End Sub

--
HTH...

Jim Thomlinson


"Optitron" wrote:


Whoops...I meant to say "AF-1" as in; that's the contents of the cell I
want to go to, not cell AF1. Basically I'm trying to get to the name of
a toolbox on a list of 3000 rows without scrolling there.


--
Optitron
------------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...o&userid=26729
View this thread: http://www.excelforum.com/showthread...hreadid=467544




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Goto Button


That did it, thanks dominicb

--
Optitro
-----------------------------------------------------------------------
Optitron's Profile: http://www.excelforum.com/member.php...fo&userid=2672
View this thread: http://www.excelforum.com/showthread.php?threadid=46754

Reply
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
create a goto button in excel billy boy Excel Worksheet Functions 1 November 25th 05 04:30 PM
On Error Goto doesn't goto Paul Excel Programming 1 October 15th 04 03:51 PM
On Error Goto doesn't goto Paul Excel Programming 0 October 15th 04 03:05 PM
GoTo Worksheet based on which button clicked Paul Martin Excel Programming 2 July 6th 04 06:22 AM
Goto method fails when assigning a macro to a button Deanne[_2_] Excel Programming 1 August 5th 03 04:36 PM


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