Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Cancel Input Box error

I'd probably go with something like...

Dim sNum$, sMsgs$
smsg = "Pick no more than " & vbCr _
& Space(10) & rngFnd.Offset(, 6) & " Stocks" & vbCr _
& "for Código I: " & myFnd & " Quantidade Retirada in Cell F10"

sNum = InputBox(smsg, "Quantidade Retirada")
If sNum = "" Then
[F6,F8,F10,J10].ClearContents
'MsgBox "You canceled"
Exit Sub
End If

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Cancel Input Box error

On Thursday, October 23, 2014 1:05:18 AM UTC-7, GS wrote:
I'd probably go with something like...

Dim sNum$, sMsgs$
smsg = "Pick no more than " & vbCr _
& Space(10) & rngFnd.Offset(, 6) & " Stocks" & vbCr _
& "for Código I: " & myFnd & " Quantidade Retirada in Cell F10"

sNum = InputBox(smsg, "Quantidade Retirada")
If sNum = "" Then
[F6,F8,F10,J10].ClearContents
'MsgBox "You canceled"
Exit Sub
End If

--
Garry



I'll give it a go.

Thanks Garry.

Howard
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Cancel Input Box error

Oops.., there's a typo...


Sub test()
Dim sNum$, sMsg$
sMsg = "Pick no more than " & vbCr _
& Space(10) & rngFnd.Offset(, 6) & " Stocks" & vbCr _
& "for Código I: " & myFnd & " Quantidade Retirada in Cell F10"

sNum = InputBox(sMsg, "Quantidade Retirada")
If sNum = "" Then MsgBox "Nothing entered"
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Cancel Input Box error

On Thursday, October 23, 2014 3:18:05 AM UTC-7, GS wrote:
Oops.., there's a typo...


Sub test()
Dim sNum$, sMsg$
sMsg = "Pick no more than " & vbCr _
& Space(10) & rngFnd.Offset(, 6) & " Stocks" & vbCr _
& "for Código I: " & myFnd & " Quantidade Retirada in Cell F10"

sNum = InputBox(sMsg, "Quantidade Retirada")
If sNum = "" Then MsgBox "Nothing entered"
End Sub

--
Garry




Yes, I caught the typo, and it works well with "cleaner" coding.

Thanks again.

Howard
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Cancel Input Box error

You're welcome, ..as always!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




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
Input Box Vs Cancel Ardy Excel Programming 6 September 6th 07 07:44 AM
Input Box - Hit cancel Steven Excel Programming 5 October 10th 06 04:23 PM
Input box to cancel sub when Cancel is clicked. PCLIVE Excel Programming 5 September 5th 06 03:19 PM
Input box cancel Little Penny Excel Programming 1 August 25th 06 11:50 PM
Input box cancel produces error pkeegs Excel Programming 5 April 12th 06 06:05 AM


All times are GMT +1. The time now is 05:52 AM.

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"