LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default VBA macro to select a tab

I bet when you got the compile error, you were running the code from another
worksheet besides the one with the value in B14.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Eduardo" wrote:

Hi, dmoney, and thank you for the replay. I am getting a compile error. I am
using excel 2007

"dmoney" wrote:

you can assign the value of cell B14 to a variable and use the variable to
select the appropriate tab.

dim tab as string
tab=range("b14").value
worksheets(tab).select


HTH

dmoney

"Eduardo" wrote:

Hi everybody, I hope you can help me with this one. I have a Pivot table
where I have a macro that update my invoicing information from an external
data. So every month I run that macro to have the sales of the previous
month. The month in the PV is in cell B14. In the same worksheet I have
different tabs for each month where I copy the information as values in order
to create a Summary of sales. What I need to do is once the macro is run and
the month show up in cell B14 is go to the corresponding tab i.e. Aug. Thank
you in advance

 
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
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Macro to select files and then run different macro on selected file [email protected] Excel Programming 5 January 31st 08 03:39 AM
Select a macro button with a macro Spike Excel Programming 0 April 20th 06 12:31 PM
How to Select a Row in VB Macro Alan Tang Excel Programming 2 July 6th 04 12:03 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


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