Advanced Excel Users - Great Lakes 4x4. The largest offroad forum in the Midwest

Go Back   Great Lakes 4x4. The largest offroad forum in the Midwest > General 4x4 Stuff > The Pub
GL4x4 Live! GL4x4 Casino

The Pub A friendly forum where everybody is nice, and will answer any questions you have about life.

greatlakes4x4.com is the premier Great Lakes 4x4 Forum on the internet. Registered Users do not see the above ads.
Search
Reply
 
Thread Tools Search this Thread
Old August 7th, 2009, 07:41 AM   #1
Coynster
ecoyne
 
Join Date: 11-06-05
Location: Metro Detroit, MI
Posts: 422
iTrader: (0)
Mentioned: 0 Post(s)
Default Advanced Excel Users

I have one workbook...

Each tab is dated for the date of the week, ie todays tab is 8, tomorrows 9, etc...

I'd like to create one macro in this worksheet that will analyze some
data and do some sorting for me...

What I'd like to know is how I can program my macro to prompt me
for the Tab to analyze, so I only have one macro to analyze my data...

So, upon activating the macro, the macro would prompt which tab to analyze, and then conduct its sorting, which i have the ability to code myself...

Make sense? Any questions?

Appreciate any help!

Thanks!
Coynster is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old August 7th, 2009, 09:08 AM   #2
JeepInABox
Jeep yard art collector.
 
JeepInABox's Avatar
 
Join Date: 10-25-07
Location: Fenton
Posts: 2,307
iTrader: (8)
Mentioned: 0 Post(s)
Default

open tab run macro, open next tab rum macro
or select multiple tabs and run macro
JeepInABox is offline   Reply With Quote
Old August 7th, 2009, 09:12 AM   #3
Coynster
ecoyne
 
Join Date: 11-06-05
Location: Metro Detroit, MI
Posts: 422
iTrader: (0)
Mentioned: 0 Post(s)
Default

I'd like to set it up with a button macro without having a button on every sheet, hence why I'm asking for help with be setup listed above...
Coynster is offline   Reply With Quote
Old August 7th, 2009, 09:42 AM   #4
techman
Senior Member
 
Join Date: 09-04-06
Location: SE MI
Posts: 689
iTrader: (7)
Mentioned: 0 Post(s)
Default

sName = Application.InputBox(Prompt:="Enter new worksheet name")

Use sName in macro to reference the worksheet name/cells
techman is offline   Reply With Quote
Old August 7th, 2009, 09:49 AM   #5
Coynster
ecoyne
 
Join Date: 11-06-05
Location: Metro Detroit, MI
Posts: 422
iTrader: (0)
Mentioned: 0 Post(s)
Default

There you go, thank you! Could you quickly write the correct syntax using above to copy cells a1:c1?

So I'd start my macro, it'd prompt me to enter worksheet name, which for todays example I'd enter 7, and then what's the syntax for using the sname command?

Appreciate your help!
Coynster is offline   Reply With Quote
Old August 7th, 2009, 10:40 AM   #6
techman
Senior Member
 
Join Date: 09-04-06
Location: SE MI
Posts: 689
iTrader: (7)
Mentioned: 0 Post(s)
Default

Sheets(sName).Select

Will select the tab/worksheet then just do whatever you need to do, select, delete, format, sum, etc.
techman is offline   Reply With Quote
Old August 7th, 2009, 10:46 AM   #7
RyeBread
Catch the wave
 
RyeBread's Avatar
 
Join Date: 11-08-05
Location: Fenton
Posts: 7,950
iTrader: (2)
Mentioned: 0 Post(s)
Default

o.O I usually just hit alt+f8 load the macro and run it. sometimes finding an elegant solution is more trouble than it's worth :p
RyeBread is offline   Reply With Quote
Old August 7th, 2009, 11:06 AM   #8
Coynster
ecoyne
 
Join Date: 11-06-05
Location: Metro Detroit, MI
Posts: 422
iTrader: (0)
Mentioned: 0 Post(s)
Default

Quote:
Originally Posted by RyeBread View Post
o.O I usually just hit alt+f8 load the macro and run it. sometimes finding an elegant solution is more trouble than it's worth :p
Hmm, hot key may work even better...

Thank you both.. I'm not going for elegance as much as I am simplicity and function!
Coynster is offline   Reply With Quote
Old August 7th, 2009, 11:13 AM   #9
JeepInABox
Jeep yard art collector.
 
JeepInABox's Avatar
 
Join Date: 10-25-07
Location: Fenton
Posts: 2,307
iTrader: (8)
Mentioned: 0 Post(s)
Default

I always go for the hot key "shift q" since it one hand and quick to find.
JeepInABox is offline   Reply With Quote
Reply
Great Lakes 4x4. The largest offroad forum in the Midwest > General 4x4 Stuff > The Pub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:24 AM.


Powered by: vBulletin, Copyright 2000 - 2012, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd. Runs best on HiVelocity Hosting.
Page generated in 0.15830 seconds with 47 queries