View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VbOk not responding

response = MsgBox( "There are no files", vbOKOnly, ["NO FILES FOUND."])
Else
response = MsgBox( "There are " & Counter - 1 & " FILES" & (Chr(10)) & "It
will take
approximately " & ((Counter - 1) * 2) & " seconds to refresh. " & (Chr(10))
&
"Would you like to proceed?", vbQuestion + vbOKCancel)

You have to assign response to hold the return value of msgbox

--
Regards,
Tom Ogilvy


"Myriam" wrote in message
...
Hi guys! Please Heeeelp!
For some reason the Response = vbOk is not running and I have tried

multiple
ways without success. This is the last try I did. And no matter what I

do,
it will not open the form. Could someone please tell me what am I doing

wrong?
Thanks in advance!
------------------------


ListFilesInDirectory (Sheets(1).Range("B1").Value)

For Counter = 1 To iFile

Worksheets("Updating").Cells(Counter, 1).Value = aFiles(Counter)
Next
If Counter - 1 = 0 Then
Worksheets("Updating").Range("D1").Value = (Counter - 1)
MsgBox "There are no files", vbOKOnly, ["NO FILES FOUND."]
Else
MsgBox "There are " & Counter - 1 & " FILES" & (Chr(10)) & "It will take
approximately " & ((Counter - 1) * 2) & " seconds to refresh. " &

(Chr(10)) &
"Would you like to proceed?", vbQuestion + vbOKCancel
If Response = vbCancel Then
'do nothing
ElseIf Response = vbOK Then
frmProgress.show

End If

End If

End Sub