#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Macro Question

I'm using this:

Sub Macro1()


Workbooks.Open Filename:="J:\Projects\MarketShare May 2007.xls"



'Trying to add code that will prompt me to select one of the worksheets
in the above workbook



Range("A7:I19").Select

Application.CutCopyMode = False

Selection.Copy

Windows("OCC_Top10.xls").Activate

Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _

False, Transpose:=False

Application.CutCopyMode = False



'Trying to add code that will email the current selection to
"





End Sub



Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Macro Question

Sub demo()
Dim s As String
s = Application.InputBox("enter tab name:", 2)
Sheets(s).Activate
End Sub
--
Gary''s Student - gsnu200721
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Macro Question

hi,
1. try this...
Sub pickone()
Dim pko As String
pko = InputBox("enter a sheet name")
Sheets(pko).Select
End Sub
and it may just be me but clicking the tab seems easier.
2. see this site...
http://www.rondebruin.nl/sendmail.htm

regards
FSt1


"carl" wrote:

I'm using this:

Sub Macro1()


Workbooks.Open Filename:="J:\Projects\MarketShare May 2007.xls"



'Trying to add code that will prompt me to select one of the worksheets
in the above workbook



Range("A7:I19").Select

Application.CutCopyMode = False

Selection.Copy

Windows("OCC_Top10.xls").Activate

Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _

False, Transpose:=False

Application.CutCopyMode = False



'Trying to add code that will email the current selection to
"





End Sub



Thank you in advance.

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
Macro Question Carl Excel Worksheet Functions 1 August 25th 06 07:40 PM
Macro Question Carl Excel Worksheet Functions 1 August 24th 06 09:03 PM
Macro Question carl Excel Worksheet Functions 0 June 7th 06 06:14 PM
Macro Question ALoecher New Users to Excel 3 March 9th 06 10:12 PM
Using a macro question. Adam Kroger Excel Discussion (Misc queries) 6 December 15th 05 09:55 PM


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