Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 97 - Have code to get values from a closed workbook.
Once completed I want a Message Box to appear asking if you want t view the data. If you select Yes it should open up a hidden page. I you slect No it should move to another page. I have worked with Msg Boxes a little but am not sure what I am doin wrong! Keep getting error messages. Here's the code I currently have. Sub Importmonday() GetValuesFromAClosedWorkbook "C:\Data", "Day 1.xls", _ "Sheet1", "AX100:BR1977" End Sub Sub GetValuesFromAClosedWorkbook(fPath As String, _ fName As String, sName, cellRange As String) With ActiveSheet.Range(cellRange) .FormulaArray = "='" & fPath & "\[" & fName & "]" _ & sName & "'!" & cellRange .Value = .Value End With Answer = MsgBox("Do you want to view Rosters?", _ vbYesNo + vbQuestion, "Rosters Imported!") If Answer = vbYes Then Sheets("Today").Select Exit Sub If Answer = vbYes Then Sheets("Timeline").Visible = True Sheets("Timeline").Select End Sub While I am fairly new to VBA, I know a little and can't figure out wha to correct! Thanks -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining data | Excel Worksheet Functions | |||
Combining data | Excel Worksheet Functions | |||
Combining Data | Excel Discussion (Misc queries) | |||
combining multiple rows of data into one single row of data | Excel Worksheet Functions | |||
combining data | Excel Worksheet Functions |