PDA

View Full Version : Linking cells to sheets & Duplicate W/Sheets



Mr.G
05-21-2009, 10:04 AM
Hi All
could someone have a look at this and advise me.......

Here is my story
The workbook consists of basically of a index sheet where only column A & B has info in. Name and serial number. Each of these should be hyperlinked to a sheet in the workbook that shows the history of the Name or Serial no.

Then I have a userform where you can either select existing name or serial number and view their history or you can add a new Name and Serial no.

Now the last part is where this challenges:banghead: comes in......when you add the new name and serial it opens a new sheet ,names it after the serial number and adds the name and serial no. to the index.

Number 1:dunno
The last New entry is not linked to the sheet for it.
Number 2:think:
If you enter a duplicate serial number it opens the sheet and names it worksheet not serial number. This should give you a error message that basically resets the userform.

I hope this helps and that you can help. Or let me know if it is possible.
Thank you

Mr.G
05-28-2009, 04:18 AM
Could I combine these 2 codes so that the hyperlink of active cell is to the last sheet instead of google?

Find last sheet....
Worksheets(Worksheets.Count).Activate
And then.....
Sub AddHyperLink()
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"http://www.google.com/", ScreenTip:="whatever", TextToDisplay:="whatever"
End Sub

Thank you