Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Search for worksheet


HELP!!!

I need someone with brains.

I need to be able to click a button, that will automatically search for
a worksheet that has the same name as a particular cell and open it.
Then when some ammends are made, a button that takes me back to the
first page.

i.e I have a spread sheet that when you type in an order number (eg
060000) it creates a new worksheet with that name (so i can add notes)
That works fine, but I now need to put a button on my sheet to edit
those note. so when clicked it will jump to the sheet named by that job
number (060000)

I've searched high and low for a solution. is it possible?


--
jarvis1979
------------------------------------------------------------------------
jarvis1979's Profile: http://www.excelforum.com/member.php...o&userid=24963
View this thread: http://www.excelforum.com/showthread...hreadid=384923

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Search for worksheet

Try these. Amend as needed.
Put the first in the worksheet module of the first sheet.

Put the second in a general module.
On each sheet add a textbox or button and assign the second macro to it.

======================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ws As Worksheet
If Target.Column = 1 And Len(Target) 0 Then
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = Target Then
ws.Select
End If
Next
End If
End Sub
==============================
Sub Sheet1Select()
Application.EnableEvents = False

Sheets(1).Select

Application.EnableEvents = True

End Sub
=================================

hth
--
steveB

Remove "AYN" from email to respond
"jarvis1979" wrote
in message ...

HELP!!!

I need someone with brains.

I need to be able to click a button, that will automatically search for
a worksheet that has the same name as a particular cell and open it.
Then when some ammends are made, a button that takes me back to the
first page.

i.e I have a spread sheet that when you type in an order number (eg
060000) it creates a new worksheet with that name (so i can add notes)
That works fine, but I now need to put a button on my sheet to edit
those note. so when clicked it will jump to the sheet named by that job
number (060000)

I've searched high and low for a solution. is it possible?


--
jarvis1979
------------------------------------------------------------------------
jarvis1979's Profile:
http://www.excelforum.com/member.php...o&userid=24963
View this thread: http://www.excelforum.com/showthread...hreadid=384923



  #3   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default Search for worksheet

Hi jarvis1979,

I am afraid you don't need lotsa brains to find this solution :-)

Sub test()
On Error Resume Next
With ThisWorkbook
.Sheets(.ActiveSheet.Range("A1").Value).Activate
End With
If Err.Number = 9 Then MsgBox "sheet doesn't exist"
End Sub


where [A1] contains "060000"

Regards,
KL


"jarvis1979" wrote
in message ...

HELP!!!

I need someone with brains.

I need to be able to click a button, that will automatically search for
a worksheet that has the same name as a particular cell and open it.
Then when some ammends are made, a button that takes me back to the
first page.

i.e I have a spread sheet that when you type in an order number (eg
060000) it creates a new worksheet with that name (so i can add notes)
That works fine, but I now need to put a button on my sheet to edit
those note. so when clicked it will jump to the sheet named by that job
number (060000)

I've searched high and low for a solution. is it possible?


--
jarvis1979
------------------------------------------------------------------------
jarvis1979's Profile:
http://www.excelforum.com/member.php...o&userid=24963
View this thread: http://www.excelforum.com/showthread...hreadid=384923



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
Search one worksheet to pull data into another worksheet HyperMite Excel Worksheet Functions 6 March 4th 09 01:53 PM
Can I search for a worksheet by Tab Name? Jerry L Excel Discussion (Misc queries) 2 November 10th 08 02:14 PM
Search one worksheet for values in another worksheet? ClayShooters Excel Discussion (Misc queries) 1 July 4th 06 03:01 PM
Search using multiple worksheet gloss Excel Worksheet Functions 5 May 10th 06 02:34 AM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM


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