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

(I am currently in the Navy, onboard the USS Stennis)I am
having a problem creating a macro that allows others (who
are not excel smart) to enter a new name. This name
would then be posted on a new worksheet tab along with
the name being entered onto the front page (to be
hyperlinked to its coresponding worksheets (based on the
name)
For example:
The user runs the macro. It prompts the user to enter a
name (say john). The macro then creates
WKSHTS: John, John(1), John(2). and on the home page the
name John is entered to be hyperlinked to the
worksheet "John". (There are at least 40 wkshts) The
problem is I am leaving my command soon. I have done all
of the changes myself w/o macros (i just learned about
them). However, my replacement is not excel smart. I
have tried to explain to him what to do (even tried to
write out the instructions) with no avail. I created
this program and my CO wants to keep it running w/o me.
I thank you very much for your time.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Creating Trainees with macros

Hi David,

Try this

Sub NewSheet()
Dim ans
Dim cRows As Long

ans = InputBox("Supply sheet name", "Add Worksheets")
If ans < "" Then
Worksheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = ans
cRows = Worksheets(1).Cells(Rows.Count, "A").End(xlUp).Row + 1
Worksheets(1).Hyperlinks.Add Anchor:=Worksheets(1).Range("A" &
cRows), _
Address:="", _
SubAddress:="'" & ans & "'!A1", _
TextToDisplay:=ans
Worksheets(1).Activate
End If
End Sub


--

HTH

RP

"David B." wrote in message
...
(I am currently in the Navy, onboard the USS Stennis)I am
having a problem creating a macro that allows others (who
are not excel smart) to enter a new name. This name
would then be posted on a new worksheet tab along with
the name being entered onto the front page (to be
hyperlinked to its coresponding worksheets (based on the
name)
For example:
The user runs the macro. It prompts the user to enter a
name (say john). The macro then creates
WKSHTS: John, John(1), John(2). and on the home page the
name John is entered to be hyperlinked to the
worksheet "John". (There are at least 40 wkshts) The
problem is I am leaving my command soon. I have done all
of the changes myself w/o macros (i just learned about
them). However, my replacement is not excel smart. I
have tried to explain to him what to do (even tried to
write out the instructions) with no avail. I created
this program and my CO wants to keep it running w/o me.
I thank you very much for your time.



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
creating macros AL Excel Worksheet Functions 0 March 26th 10 06:55 PM
Need help creating macros Atom Oaks New Users to Excel 6 January 11th 10 03:06 PM
creating macros garygc Excel Discussion (Misc queries) 1 February 5th 09 11:24 PM
macros creating NSNR Excel Discussion (Misc queries) 2 October 26th 07 08:19 AM
creating excel macros Dick Excel Worksheet Functions 0 June 2nd 06 06:56 PM


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