Command Button

P

Priss

Need help creating a command button within a workbook (Book1) that will open
a different worksheet (Tab5) within the same workbook.
 
G

Gary''s Student

Place ANY piece of ClipArt on the worksheet. If you like buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
 
P

Priss

Okay, I am working with Office 2007. I choose a command button, right click
and didn't see what you mentioned. I even tryed the ActiveX control as well.
I think I am just lost.
 
G

Gary''s Student

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design mode,
then right-click the button and select View Code. Then insert the line:

Call Macro3

in the sub that appears
 
P

Priss

Okay, I know it's user error and I am not that familiar. It may have
something to do with the way I am explaining too. But my workbook has (7)
worksheets - tab 1-7. One of those worksheets have names on it. When the
individual click there command button, I want it to go to that particular
worksheet which is for them ONLY. Not sure if this helped.

Gary''s Student said:
O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design mode,
then right-click the button and select View Code. Then insert the line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


Priss said:
Okay, I am working with Office 2007. I choose a command button, right click
and didn't see what you mentioned. I even tryed the ActiveX control as well.
I think I am just lost.
 
G

Gary''s Student

What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the Excel
window.
--
Gary''s Student - gsnu200830


Priss said:
Okay, I know it's user error and I am not that familiar. It may have
something to do with the way I am explaining too. But my workbook has (7)
worksheets - tab 1-7. One of those worksheets have names on it. When the
individual click there command button, I want it to go to that particular
worksheet which is for them ONLY. Not sure if this helped.

Gary''s Student said:
O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design mode,
then right-click the button and select View Code. Then insert the line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


Priss said:
Okay, I am working with Office 2007. I choose a command button, right click
and didn't see what you mentioned. I even tryed the ActiveX control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook (Book1) that will open
a different worksheet (Tab5) within the same workbook.
 
P

Priss

I want to jump Tab2 based on command button 1 and then Tab3 based on command
button 2 . There name is on the command button.

Gary''s Student said:
What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the Excel
window.
--
Gary''s Student - gsnu200830


Priss said:
Okay, I know it's user error and I am not that familiar. It may have
something to do with the way I am explaining too. But my workbook has (7)
worksheets - tab 1-7. One of those worksheets have names on it. When the
individual click there command button, I want it to go to that particular
worksheet which is for them ONLY. Not sure if this helped.

Gary''s Student said:
O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design mode,
then right-click the button and select View Code. Then insert the line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command button, right click
and didn't see what you mentioned. I even tryed the ActiveX control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook (Book1) that will open
a different worksheet (Tab5) within the same workbook.
 
R

Rick Rothstein

Assuming the names on the tabs are Tab2, Tab3, etc., then use this macro for
Command Button 1...

Sub GoToTab2()
Sheets("Tab2").Activate
End Sub

Use this macro for Command Button 2...

Sub GoToTab3()
Sheets("Tab3").Activate
End Sub

The name of the macros is unimportant; how to continue this process should
be apparent.

--
Rick (MVP - Excel)


Priss said:
I want to jump Tab2 based on command button 1 and then Tab3 based on
command
button 2 . There name is on the command button.

Gary''s Student said:
What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the Excel
window.
--
Gary''s Student - gsnu200830


Priss said:
Okay, I know it's user error and I am not that familiar. It may have
something to do with the way I am explaining too. But my workbook has
(7)
worksheets - tab 1-7. One of those worksheets have names on it. When
the
individual click there command button, I want it to go to that
particular
worksheet which is for them ONLY. Not sure if this helped.

:

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the
button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design
mode,
then right-click the button and select View Code. Then insert the
line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command button,
right click
and didn't see what you mentioned. I even tryed the ActiveX
control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like
buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook (Book1)
that will open
a different worksheet (Tab5) within the same workbook.
 
P

Priss

Thanks for direction...
Here is what I ended up doing -

Private Sub CommandButton1_Click()
Sheets("Tab3").Select
End Sub

Now that I am on that sheet, I want to save it and return back to the main
"name" sheet. This is what I have so far. But it doesn't take me back to
the "name".
Private Sub CommandButton1_Click()
Sheet5.Activate
OKtoSave = True
ThisWorkbook.Save
End Sub

Rick Rothstein said:
Assuming the names on the tabs are Tab2, Tab3, etc., then use this macro for
Command Button 1...

Sub GoToTab2()
Sheets("Tab2").Activate
End Sub

Use this macro for Command Button 2...

Sub GoToTab3()
Sheets("Tab3").Activate
End Sub

The name of the macros is unimportant; how to continue this process should
be apparent.

--
Rick (MVP - Excel)


Priss said:
I want to jump Tab2 based on command button 1 and then Tab3 based on
command
button 2 . There name is on the command button.

Gary''s Student said:
What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the Excel
window.
--
Gary''s Student - gsnu200830


:

Okay, I know it's user error and I am not that familiar. It may have
something to do with the way I am explaining too. But my workbook has
(7)
worksheets - tab 1-7. One of those worksheets have names on it. When
the
individual click there command button, I want it to go to that
particular
worksheet which is for them ONLY. Not sure if this helped.

:

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the
button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design
mode,
then right-click the button and select View Code. Then insert the
line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command button,
right click
and didn't see what you mentioned. I even tryed the ActiveX
control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like
buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook (Book1)
that will open
a different worksheet (Tab5) within the same workbook.
 
R

Rick Rothstein

Let's get the obvious question out of the way... is the "main 'name'" sheet
named "Sheet5"?

--
Rick (MVP - Excel)


Priss said:
Thanks for direction...
Here is what I ended up doing -

Private Sub CommandButton1_Click()
Sheets("Tab3").Select
End Sub

Now that I am on that sheet, I want to save it and return back to the main
"name" sheet. This is what I have so far. But it doesn't take me back to
the "name".
Private Sub CommandButton1_Click()
Sheet5.Activate
OKtoSave = True
ThisWorkbook.Save
End Sub

Rick Rothstein said:
Assuming the names on the tabs are Tab2, Tab3, etc., then use this macro
for
Command Button 1...

Sub GoToTab2()
Sheets("Tab2").Activate
End Sub

Use this macro for Command Button 2...

Sub GoToTab3()
Sheets("Tab3").Activate
End Sub

The name of the macros is unimportant; how to continue this process
should
be apparent.

--
Rick (MVP - Excel)


Priss said:
I want to jump Tab2 based on command button 1 and then Tab3 based on
command
button 2 . There name is on the command button.

:

What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the
Excel
window.
--
Gary''s Student - gsnu200830


:

Okay, I know it's user error and I am not that familiar. It may
have
something to do with the way I am explaining too. But my workbook
has
(7)
worksheets - tab 1-7. One of those worksheets have names on it.
When
the
individual click there command button, I want it to go to that
particular
worksheet which is for them ONLY. Not sure if this helped.

:

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the
button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design
mode,
then right-click the button and select View Code. Then insert the
line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command button,
right click
and didn't see what you mentioned. I even tryed the ActiveX
control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like
buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook
(Book1)
that will open
a different worksheet (Tab5) within the same workbook.
 
P

Priss

The "main sheet" is called BP Sign-on. The names reside on this sheet. Once
they click the button with their name, is goes to their sheet (TAB2). They
update, click command button to save - but I want it to go back to the BP
Sign-on for the next person when they open it.


Rick Rothstein said:
Let's get the obvious question out of the way... is the "main 'name'" sheet
named "Sheet5"?

--
Rick (MVP - Excel)


Priss said:
Thanks for direction...
Here is what I ended up doing -

Private Sub CommandButton1_Click()
Sheets("Tab3").Select
End Sub

Now that I am on that sheet, I want to save it and return back to the main
"name" sheet. This is what I have so far. But it doesn't take me back to
the "name".
Private Sub CommandButton1_Click()
Sheet5.Activate
OKtoSave = True
ThisWorkbook.Save
End Sub

Rick Rothstein said:
Assuming the names on the tabs are Tab2, Tab3, etc., then use this macro
for
Command Button 1...

Sub GoToTab2()
Sheets("Tab2").Activate
End Sub

Use this macro for Command Button 2...

Sub GoToTab3()
Sheets("Tab3").Activate
End Sub

The name of the macros is unimportant; how to continue this process
should
be apparent.

--
Rick (MVP - Excel)


I want to jump Tab2 based on command button 1 and then Tab3 based on
command
button 2 . There name is on the command button.

:

What is the name of the worksheet (tabname) that you want to jump to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the
Excel
window.
--
Gary''s Student - gsnu200830


:

Okay, I know it's user error and I am not that familiar. It may
have
something to do with the way I am explaining too. But my workbook
has
(7)
worksheets - tab 1-7. One of those worksheets have names on it.
When
the
individual click there command button, I want it to go to that
particular
worksheet which is for them ONLY. Not sure if this helped.

:

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click the
button
and use Assign Macro

If you have put a Controls button the sheet, first click on Design
mode,
then right-click the button and select View Code. Then insert the
line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command button,
right click
and didn't see what you mentioned. I even tryed the ActiveX
control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like
buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook
(Book1)
that will open
a different worksheet (Tab5) within the same workbook.
 
R

Rick Rothstein

Then add this line after the Save line...

Sheets("BP Sign-on").Activate

--
Rick (MVP - Excel)


Priss said:
The "main sheet" is called BP Sign-on. The names reside on this sheet.
Once
they click the button with their name, is goes to their sheet (TAB2).
They
update, click command button to save - but I want it to go back to the BP
Sign-on for the next person when they open it.


Rick Rothstein said:
Let's get the obvious question out of the way... is the "main 'name'"
sheet
named "Sheet5"?

--
Rick (MVP - Excel)


Priss said:
Thanks for direction...
Here is what I ended up doing -

Private Sub CommandButton1_Click()
Sheets("Tab3").Select
End Sub

Now that I am on that sheet, I want to save it and return back to the
main
"name" sheet. This is what I have so far. But it doesn't take me back
to
the "name".
Private Sub CommandButton1_Click()
Sheet5.Activate
OKtoSave = True
ThisWorkbook.Save
End Sub

:

Assuming the names on the tabs are Tab2, Tab3, etc., then use this
macro
for
Command Button 1...

Sub GoToTab2()
Sheets("Tab2").Activate
End Sub

Use this macro for Command Button 2...

Sub GoToTab3()
Sheets("Tab3").Activate
End Sub

The name of the macros is unimportant; how to continue this process
should
be apparent.

--
Rick (MVP - Excel)


I want to jump Tab2 based on command button 1 and then Tab3 based on
command
button 2 . There name is on the command button.

:

What is the name of the worksheet (tabname) that you want to jump
to??

Is it Sheet5 or Tab5 ??

I am refering to the name on the worksheet tab at the bottom of the
Excel
window.
--
Gary''s Student - gsnu200830


:

Okay, I know it's user error and I am not that familiar. It may
have
something to do with the way I am explaining too. But my
workbook
has
(7)
worksheets - tab 1-7. One of those worksheets have names on it.
When
the
individual click there command button, I want it to go to that
particular
worksheet which is for them ONLY. Not sure if this helped.

:

O.K. Put this macro in a standard module:

Sub Macro3()
Application.Goto Reference:="Tab5!R[-8]C[-11]"
End Sub

If you have put a Forms button on the sheets, then right-click
the
button
and use Assign Macro

If you have put a Controls button the sheet, first click on
Design
mode,
then right-click the button and select View Code. Then insert
the
line:

Call Macro3

in the sub that appears
--
Gary''s Student - gsnu200830


:

Okay, I am working with Office 2007. I choose a command
button,
right click
and didn't see what you mentioned. I even tryed the ActiveX
control as well.
I think I am just lost.

:

Place ANY piece of ClipArt on the worksheet. If you like
buttons, make a
button using the rectangle from AutoShapes.

Right-click the Object and pick Assign Hyperlink.

Make the hyperlink to a place on Tab5
--
Gary''s Student - gsnu200830


:

Need help creating a command button within a workbook
(Book1)
that will open
a different worksheet (Tab5) within the same workbook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top