Hi Anthony
Thanks for the immediate response........so what you sent me retrieves the total number of nurses on the scheduled date and says that through a message box........
I have an other doubt in the following macro
'
' Macro2 Macro
' Macro recorded 12/08/2009 by Anthony Osborn
Dim monthname As String, wbInput As Workbook, wsInput As Worksheet, wbdata As Workbook
Set wbdata = ThisWorkbook
Set wbInput = Workbooks.Open(ThisWorkbook.Path & "\" & cstrFILE_INPUT)
Set wsInput = wbInput.Sheets(ComboBox1.Text)
Range("I1:O3").Select
With Selection
.MergeCells = False
End With
monthname = Format(ActiveCell.Value, "mmmm")
MsgBox monthname
With Selection
.MergeCells = True
End With
nonurses = Cells(1, 1)
MsgBox nonurses & " " & monthname
Exit Sub
'
End Sub
If I choose a date and a month for which the total # of nurses is already scheduled......... then it retrieves the total number of nurses and pops up a window with the total number of nurses..........But If i have not entered anything for the total number of nurses for a month in the ' input for the # of nurses' excel sheet then according to the above macro....... if there is no nurses scheduled for a month then a message box should open saying no nurses and month name ........but it is not happening ...
If I run the above macro seperately it gives run time error I don't know why.....I made sure that all the files are in the same directory but also it gives a 'run time error 1004'......
Thanks
Bharath