Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default VbOk not responding

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default VbOk not responding

Hi, Tom,

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

I'm sorry but I still don't get it. Could you please give me an example?
Thanks,


"Tom Ogilvy" wrote:

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default VbOk not responding

Tom,
Thank you so much. You had already given me the example... I appreciate it.
My eyes are probably not working properly...<g
Thanks again. You saved my day!


"Tom Ogilvy" wrote:

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




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
Not responding...... Steve Excel Worksheet Functions 0 November 23rd 09 10:25 PM
why does it say not responding genyjoL New Users to Excel 2 October 22nd 09 05:13 AM
Excel not responding iranuc Charts and Charting in Excel 1 May 6th 09 04:12 AM
non-responding chart Gene Excel Discussion (Misc queries) 0 May 5th 09 06:28 AM
Reference not responding Peter[_47_] Excel Programming 0 October 7th 04 08:58 AM


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