ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro help (https://www.excelbanter.com/excel-programming/353807-macro-help.html)

Harps

Macro help
 
I need help to write a macro which asks what month, and then searches for
that month in the tabs and takes the information from that worksheet

Tom Ogilvy

Macro help
 
Sub PromptForMonth()
Dim res as String
Dim mnth as String
Dim sh as Worksheet
res = InputBox("Enter Month as "FEB")
if isdate(res & " 1, 2000") then
mnth = Format(cdate(res & ", 2000"),"mmm")
set sh = Worksheets(mnth)
else
Msgbox "Not a valid entry"
End if
|End Sub

--
Regards,
Tom Ogilvy


"Harps" <u18912@uwe wrote in message news:5c2a3eadc1114@uwe...
I need help to write a macro which asks what month, and then searches for
that month in the tabs and takes the information from that worksheet





All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com