Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Advanced Excel--Want to click on Cell & Move to Other Tab

Hello Excel Users-

I am working on a giant monster with 18 tabs on it. I want one of my cells
on one of my tabs to just take me directly to another tab. The point of this
is to stop duplicating information; I don't want to cram the same information
into two places when it just doesn't need to be done. I would rather just
have a special cell take you directly to another tab when you click on that
cell.

I know how to insert formulas and values from Tab A into a cell in Tab B,
but I am struggling to get the entirely of Tab A into Cell 1 in Tab B.

Am I creating a link here? Do I need to insert another workbook somehow? Is
this possible? Does it make sense? Can you help me?

Thank you,

Melanie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Advanced Excel--Want to click on Cell & Move to Other Tab

Melanie -
it sounds like you are asking 2 different things. if you want to
physically travel from one sheet to another with the click (or maybe
double-click?) of a certain cell, i can do that.
but then you talk about getting all the information in tab A into
sheet B's first cell. that's a little more difficult!

so i'm going to address the movement one, first. pick a cell, i've
picked A1 just to be easy, in each sheet. leave that cell blank in
all worksheets

i'm not a guru. i've completed this lovely little macro, which works
wonderfully, in whatever worksheet module you put it in. but the only
way i can think of getting it to work for you is for you to enter it
18 times(!!!) in each spreadsheet module!

i will post the macro just in case nobody else responds. sorry. :(
'========Start of Macro==============
Option Explicit

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)

Dim wb As Workbook
Dim x As Long
Dim i As Long
Dim Wks As Worksheet
Dim r As Range

If Target.Address = "$A$1" Then

Set wb = ActiveWorkbook

x = wb.Sheets.Count

Set Wks = ActiveSheet
i = Wks.Index
If i = x Then
i = 1
Else
i = i + 1
End If
Set Wks = wb.Worksheets(i)
Wks.Activate
End If

End Sub
'===========End of Macro==============
hope it helps.
susan



On Oct 20, 1:36*pm, Melanie G.
wrote:
Hello Excel Users-

I am working on a giant monster with 18 tabs on it. I want one of my cells
on one of my tabs to just take me directly to another tab. The point of this
is to stop duplicating information; I don't want to cram the same information
into two places when it just doesn't need to be done. I would rather just
have a special cell take you directly to another tab when you click on that
cell.

I know how to insert formulas and values from Tab A into a cell in Tab B,
but I am struggling to get the entirely of Tab A into Cell 1 in Tab B.

Am I creating a link here? Do I need to insert another workbook somehow? Is
this possible? Does it make sense? Can you help me?

Thank you,

Melanie


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Advanced Excel--Want to click on Cell & Move to Other Tab

Susan

You don't have to replicate your event code 18 times.

Just place it once in Thisworkbook module as this event type.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal _
Sh As Object, ByVal Target As Range, Cancel As Boolean)


Gord Dibben MS Excel MVP

On Tue, 20 Oct 2009 11:17:02 -0700 (PDT), Susan wrote:

Melanie -
it sounds like you are asking 2 different things. if you want to
physically travel from one sheet to another with the click (or maybe
double-click?) of a certain cell, i can do that.
but then you talk about getting all the information in tab A into
sheet B's first cell. that's a little more difficult!

so i'm going to address the movement one, first. pick a cell, i've
picked A1 just to be easy, in each sheet. leave that cell blank in
all worksheets

i'm not a guru. i've completed this lovely little macro, which works
wonderfully, in whatever worksheet module you put it in. but the only
way i can think of getting it to work for you is for you to enter it
18 times(!!!) in each spreadsheet module!

i will post the macro just in case nobody else responds. sorry. :(
'========Start of Macro==============
Option Explicit

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)

Dim wb As Workbook
Dim x As Long
Dim i As Long
Dim Wks As Worksheet
Dim r As Range

If Target.Address = "$A$1" Then

Set wb = ActiveWorkbook

x = wb.Sheets.Count

Set Wks = ActiveSheet
i = Wks.Index
If i = x Then
i = 1
Else
i = i + 1
End If
Set Wks = wb.Worksheets(i)
Wks.Activate
End If

End Sub
'===========End of Macro==============
hope it helps.
susan



On Oct 20, 1:36*pm, Melanie G.
wrote:
Hello Excel Users-

I am working on a giant monster with 18 tabs on it. I want one of my cells
on one of my tabs to just take me directly to another tab. The point of this
is to stop duplicating information; I don't want to cram the same information
into two places when it just doesn't need to be done. I would rather just
have a special cell take you directly to another tab when you click on that
cell.

I know how to insert formulas and values from Tab A into a cell in Tab B,
but I am struggling to get the entirely of Tab A into Cell 1 in Tab B.

Am I creating a link here? Do I need to insert another workbook somehow? Is
this possible? Does it make sense? Can you help me?

Thank you,

Melanie


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Advanced Excel--Want to click on Cell & Move to Other Tab

Gord -
thank you! i didn't know that (obviously).
:)
susan



On Oct 20, 5:49*pm, Gord Dibben <gorddibbATshawDOTca wrote:
Susan

You don't have to replicate your event code 18 times.

Just place it once in Thisworkbook module as this event type.

Private Sub Workbook_SheetBeforeDoubleClick(ByVal _
Sh As Object, ByVal Target As Range, Cancel As Boolean)

Gord Dibben *MS Excel MVP



On Tue, 20 Oct 2009 11:17:02 -0700 (PDT), Susan wrote:
Melanie -
it sounds like you are asking 2 different things. *if you want to
physically travel from one sheet to another with the click (or maybe
double-click?) of a certain cell, i can do that.
but then you talk about getting all the information in tab A into
sheet B's first cell. *that's a little more difficult!


so i'm going to address the movement one, first. *pick a cell, i've
picked A1 just to be easy, in each sheet. *leave that cell blank in
all worksheets


i'm not a guru. *i've completed this lovely little macro, which works
wonderfully, in whatever worksheet module you put it in. *but the only
way i can think of getting it to work for you is for you to enter it
18 times(!!!) in each spreadsheet module!


i will post the macro just in case nobody else responds. *sorry. *:(
'========Start of Macro==============
Option Explicit


Private Sub Worksheet_BeforeDoubleClick _
* * * * * *(ByVal Target As Range, Cancel As Boolean)


Dim wb As Workbook
Dim x As Long
Dim i As Long
Dim Wks As Worksheet
Dim r As Range


If Target.Address = "$A$1" Then


Set wb = ActiveWorkbook


x = wb.Sheets.Count


Set Wks = ActiveSheet
* i = Wks.Index
* * *If i = x Then
* * * * i = 1
* * *Else
* * * * i = i + 1
* * *End If
Set Wks = wb.Worksheets(i)
Wks.Activate
End If


End Sub
'===========End of Macro==============
hope it helps.
susan


On Oct 20, 1:36*pm, Melanie G.
wrote:
Hello Excel Users-


I am working on a giant monster with 18 tabs on it. I want one of my cells
on one of my tabs to just take me directly to another tab. The point of this
is to stop duplicating information; I don't want to cram the same information
into two places when it just doesn't need to be done. I would rather just
have a special cell take you directly to another tab when you click on that
cell.


I know how to insert formulas and values from Tab A into a cell in Tab B,
but I am struggling to get the entirely of Tab A into Cell 1 in Tab B.


Am I creating a link here? Do I need to insert another workbook somehow? Is
this possible? Does it make sense? Can you help me?


Thank you,


Melanie- Hide quoted text -


- Show quoted text -


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
How to increment a cell by 1 on mouse click or move to another cel Jbaccinv Excel Discussion (Misc queries) 1 August 22nd 08 04:57 PM
Click "Enter" move to cell to the right, not down in Excel Art Bahrnone Excel Worksheet Functions 1 March 20th 07 03:38 AM
move to another cell on click ashfire Excel Discussion (Misc queries) 2 July 5th 06 11:05 AM
Move cell info from one worksheet to another buy click a checkmark Sherm Excel Programming 3 November 17th 05 02:10 AM
Move user to new worksheet with cell click Phil Hageman[_4_] Excel Programming 11 December 30th 04 09:16 PM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"