473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Need a skip "inputbox" statement and continue to next lines

I have an input box statement which can take a integer as below:

InputBox("eneter the number")
-----
-------

If the user doesn't enter any input for a particular time say 30 secs, i should be able to continue to next line.

Please let me know your how can implement this?
Jul 17 '08 #1
10 2355
debasisdas
8,127 Expert 4TB
i dont undetsrand the logic

if there is no data input what is the use of input box ?
Jul 17 '08 #2
i dont undetsrand the logic

if there is no data input what is the use of input box ?

==================================================
' logging off a Computer
Dim a,b,x,y,z

a= InputBox("log off after _______ minute/s?")
b=a*60000
WScript.Sleep b


Choice = InputBox("if you want cancel enter 1,if yoy want to still log off enter 2")
Select Case choice
Case 1

MsgBox ("bye")

Case 2

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e,(Shutdown)}\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(0)
Next

Case Else
MsgBox("invalid entry")


End select
-----------------

The intention of above code is:

User will schedule log off PC after a particular time. Inputbox will be prompted after that particular time. If the user is available at that time, he will cancel the operation and if the user is not available the PC should be logged off. So If no input is provided for the input box, I should be able to overcome(skip) that log off the PC.
Jul 17 '08 #3
debasisdas
8,127 Expert 4TB
Since input box is a modal window the user must respond to that.

better use a textbox .

set a default value.

if u user enters a value over write that .

if does not run with default value after the default time interval
Jul 17 '08 #4
Since input box is a modal window the user must respond to that.

better use a textbox .

set a default value.

if u user enters a value over write that .

if does not run with default value after the default time interval
I am stuck in setting the "default time interval", can u please let me know how I can implement this?
Jul 17 '08 #5
debasisdas
8,127 Expert 4TB
if the user does not enter any value after what time you want the code to execute.
Jul 17 '08 #6
if the user does not enter any value after what time you want the code to execute.
after 1 minute i want to execute the code!
Jul 18 '08 #7
debasisdas
8,127 Expert 4TB
after 1 minute i want to execute the code!
Who are you ..............???
Jul 18 '08 #8
Who are you ..............???
radharkr is friend of mine!
Jul 21 '08 #9
Hi ,
Anybody there?
Jul 29 '08 #10
debasisdas
8,127 Expert 4TB
store the value (60) secs in avariable and if the user does not enter anny value then go with this value.
Jul 29 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Prakash | last post by:
Does anyone know how to compact a table (only) ? I'm using some code o move rows up & down in a continuous form & it works fine, but after some usage the rows refuse to move up or down until I...
3
by: Les | last post by:
Hi all, i have an input box that i need the user to put in a password and just wondered if it is possible to just show a * as he types in the letters as per the normal password inputbox ? any...
1
by: james.ii.turner | last post by:
I understand why I am getting this error, I just need to find a work around for it. Here is what I'm trying to do: There is a textbox on my form that OnClick will ask the user for a new value, I...
3
by: ineedahelp | last post by:
I have declared mUser as a public variable as I need to be able to alter ALL procedures depending on the input. Option Compare Database Public mUser As String I am trying to check if the user...
2
by: jonceramic | last post by:
Hi, Question... Is there any way to put a wrapper on a raw string going through SQL, or should I bite the bullet and use a recordset method instead? Situation: I'm trying to have the user...
3
by: bxscikid | last post by:
I am using VB 6 in order to clear a listbox (lststuff) containing material entered by the user via input boxes. I am trying to utilize a command button which will clear the list for the user. When...
4
by: tragic54 | last post by:
Hello im new to visual basic, i'm on 2005 and need a little help with a project im doing. Once this code is executed an input box pops up and asks for a football score, once the score is entered it...
3
by: jac130 | last post by:
the program runs, and user is prompted via inputbox to enter an integer-this is the size of the array, then the user fills the array with that many values...but as the user enters the values, i need...
4
by: AKdlm | last post by:
I am using Access 97 (I know) and am creating a lost and found database for materials in our company. I have it all set up so an employee can enter a sales order and pick a specific line/multiple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.