Can This Happen??
Can you change someones homepage(default location a browser goes to) without them knowing about it?? Kinda like when you are prompted to set your home page as someones web site except without prompting you just set it? Can that actually be done?? If so How? .......if you tell me how maybe i will tell you why i want to know ......i will not do anything bad with it...I promise
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Why Would This Happen
Hi all
I have a strange problem and can't seem to figure it out, i have a Vsflexgrid on my form "grdjournal" in col 2 i store currency, i then use the following code to add up the figures and display it in a label "lblTotal".
Code:
Private Sub cmdSubTotal_Click()
lblTotal.Visible = True
grdJournal.SubtotalPosition = flexSTBelow
grdJournal.Subtotal flexSTSum, -1, 2, "$", vbRed
lblTotal.Caption = Format(grdJournal.TextMatrix(50, 2), "Currency")
End Sub
But for some reason it is rounding the total to the nearest whole number, for instance, in col 2
$10,50
$10,50
$10,50
will display $31,00 instead of $31,50.
Please can someone advise me as to what i might be doing wrong.
Many thanks
Why Would This Happen
Hi
I am using an access database, and on my form i have two command buttons, one command button copies data from a Table called "Sales1" into a table called "SalesHist" the other command button then deletes the same data from "Sales1", the part that is confusing me is that the queries work provided i quit my app between buttons. So if i use command1 to copy the data it works fine, if i quit the app and then use command2 the correct records are deleted and all is fine. But if i click on command1 and then 10 seconds later command2 the records are deleted from both tables, and there are'nt many records it does the same with 10 or 2.
Code:
Private Sub cmdCustomers_Click()
Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim sSQL As String
Dim tmpSQL As String
Set MyConn = New ADODB.Connection
Set MyRecSet = New ADODB.Recordset
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:pospos.mdb;"
MyConn.Open
tmpSQL = "INSERT INTO SalesHist (Tbl_No, Qty, Description, Price, Dates) SELECT Tbl_No, Qty, Description, Price, Dates FROM Sales1 WHERE Tbl_No = '" & lblTabNo.Caption & "'"
MyConn.Execute tmpSQL
MyConn.Close
End Sub
Code:
Private Sub cmdTender_Click(index As Integer)
Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Dim sSQL As String
Set MyConn = New ADODB.Connection
Set MyRecSet = New ADODB.Recordset
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:pospos.mdb;"
MyConn.Open
sSQL = "DELETE Tbl_No, Qty, Description, Price, Dates FROM Sales1 WHERE Tbl_No = '" & frmMain.lblTabNo.Caption & "'"
MyRecSet.Open sSQL, MyConn, adOpenStatic, adLockReadOnly
Unload Me
End Sub
Many thanks
Why Does This Happen?
Hi all,
I'm having a minor problem with my application. What I have is a progress bar that shows the progress of the current sub being performed. Now, this sub takes 15+ seconds to complete (depending on the listcount in the listbox). It is interacting with a third party app, which is why it takes so long.
Anyway, it works all fine and dandy...until you click on another application. When you try to switch to a new application or anything of the nature, the application temporarily 'locks up' until the sub is finished running. I've attached a picture of what it looks like when it is 'locked up'. The progress bar stops moving and if I was to go back and click on the app again, it would turn all white and say (Not Responding) in the title bar until the sub was finished. Once it finishes, everything goes back to normal. I'm thinking it's some sort of refresh/redraw problem, but I'm not sure. I have a Me.Refresh at the end of each 'Next x' in the sub (The sub runs a full time for each item in the list box) and in my form loud I have a Me.AutoRedraw=True but neither of those work.
Any ideas?
What Happen Here?
Hi, i have a public sub in a module that i call.
when i put this:
call seteatoolbar(1) it doesn't work
when i put this:
msgbox "wait"
call seteatoolbar(1) it work correctly
when i put a message box before or after the call it works right.
do you have an idea of what's happening?
Anybody Else Had This Happen Lately
I'm having some serious difficulties in running Visual Studio/VB98. While compiling and running my project. I get the dreaded "Microsoft has experienced a problem and will now be terminating yada yada yada". This has increasingly become a problem as I work from home and can't find my Visual Studio discs.. Maybe I should have just upgraded to XP Pro and installed .Net. Anyone else that has experienced difficulties feel free to reply and help me correct this problem.
Thanks
Larson
Never Seen This Happen Before ????
Hi there
We have a piece of software that's used by about 700 customers running on over 1500 machines. One particular machine of a 3 workstation network behaves in a strange way to all the others.
Its a pentium 4 running Windows XP with all the latest updates.
Here's an example of the problem
A$ = VAL("3")
but when you look in A$, you get something like 2.99999999997
This happens for nearly every whole number, I can understand if the val operation was performed on a floating point, but not on an integer.
The other machines on their network run fine and they all run the same EXE of a file server.
Appart from replacing the machine, I have no idea on what to do.
Anyone come across this problem?
Cheers
Simon Luce
Why Would This Happen
Hi all
I have a strange problem and can't seem to figure it out, i have a Vsflexgrid on my form "grdjournal" in col 2 i store currency, i then use the following code to add up the figures and display it in a label "lblTotal".
VB Code:
Private Sub cmdSubTotal_Click() lblTotal.Visible = True grdJournal.SubtotalPosition = flexSTBelow grdJournal.Subtotal flexSTSum, -1, 2, "$", vbRed lblTotal.Caption = Format(grdJournal.TextMatrix(50, 2), "Currency")End Sub
But for some reason it is rounding the total to the nearest whole number, for instance, in col 2
$10,50
$10,50
$10,50
will display $31,00 instead of $31,50.
Please can someone advise me as to what i might be doing wrong.
Many thanks
Why Would This Happen?
Hi
I am using an access database, and on my form i have two command buttons, one command button copies data from a Table called "Sales1" into a table called "SalesHist" the other command button then deletes the same data from "Sales1", the part that is confusing me is that the queries work provided i quit my app between buttons. So if i use command1 to copy the data it works fine, if i quit the app and then use command2 the correct records are deleted and all is fine. But if i click on command1 and then 10 seconds later command2 the records are deleted from both tables, and there are'nt many records it does the same with 10 or 2.
VB Code:
Private Sub cmdCustomers_Click() Dim MyConn As ADODB.Connection Dim MyRecSet As ADODB.Recordset Dim sSQL As String Dim tmpSQL As String Set MyConn = New ADODB.Connection Set MyRecSet = New ADODB.Recordset MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:pospos.mdb;" MyConn.Open tmpSQL = "INSERT INTO SalesHist (Tbl_No, Qty, Description, Price, Dates) SELECT Tbl_No, Qty, Description, Price, Dates FROM Sales1 WHERE Tbl_No = '" & lblTabNo.Caption & "'" MyConn.Execute tmpSQL MyConn.CloseEnd Sub
VB Code:
Private Sub cmdTender_Click(index As Integer) Dim MyConn As ADODB.Connection Dim MyRecSet As ADODB.Recordset Dim sSQL As String Set MyConn = New ADODB.Connection Set MyRecSet = New ADODB.Recordset MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:pospos.mdb;" MyConn.Open sSQL = "DELETE Tbl_No, Qty, Description, Price, Dates FROM Sales1 WHERE Tbl_No = '" & frmMain.lblTabNo.Caption & "'" MyConn.Execute sSQL Unload MeEnd Sub
Many thanks
Why Does This Happen?
hey guys, i ahve another question:
Option Explicit
Dim x As Long
Private Sub Command1_Click() ....................1
On Error GoTo aa .....................................2
If Form1.Name = "Form1" Then ....................3
x = CDbl(txt.Text) ...............................4
Print "ss" ...........................................5
aa: .................................................6
Call MsgBox("sdfsd") ............................7
Resume Next .................................. 8
End If
End Sub
ok now i will explain what's going on: First in the txt i have a string lateral not numeric, so when i press i get to line 4, an error occures and i get to line 6, msgbox is called then back to line 3, i get to 4 then error then to 6 then back to 5, ss is printed then i get to 6 and a msgbox....so i get 3 times the msgbox.
But in case txt is numeric: i press, reach 4,5,6 and get a msgbox, then resume to where? In this case i am getting the msgbox twice, why? where is the aa: resuming to.
thanks.
Does This Happen To You Too?
try this out. open a new project, maximise the form and put a cmd button or any other ctl right at the bottom of the form. then run it and maximise the form.... what do u see?
Why Does This Happen?
Put this line of code into a form and tell me what you get. what i get is 6.4583333, but when i do this on a calculator i get .0064583333. Why does this happen, how do i fix this?
lblpaymentout = 7.75 / (12 * 100)
Why Did This Happen?
I did my first deployment via CD today. I went to a client where I had already installed a version of my program via floppy disk.
I popped the CD in the tray, hit setup.exe, and a message appeared saying that some files were missing, and if I wanted to complete setup then I would need to re-boot the computer. I did, and when I re-started setup.exe, I got a series of messages saying that I was trying to install older dll files than what was already on the computer. It gave me the option of keeping these older files, and the setup proceesed okay.
But why did all this happen in the first place? Nothing like this happened with the floppy disks.
Anybody Have This Happen To Them!!!
Last week for no reason that I can figure out, the ability of my IE 6.0 to View the source of any webpage was disabled! How can I fix that?
Why Does His Happen?!
I get a type mismatch error when this occurs:
Private Sub Form_Load()
bActiveSession = False
hOpen = 0
hConnection = 0
optBin.Value = 1
dwType = FTP_TRANSFER_TYPE_BINARY
Dim imgI As ListImage
Set imgI = ImageList1.ListImages.Add(, "open", LoadPicture("open.bmp"))
Set imgI = ImageList1.ListImages.Add(, "closed", LoadPicture("closed.bmp"))
Set imgI = ImageList1.ListImages.Add(, "leaf", LoadPicture("leaf.bmp"))
Set imgI = ImageList1.ListImages.Add(, "root", LoadPicture("root.bmp"))
TreeView1.ImageList = ImageList1
TreeView1.Style = tvwTreelinesPictureText
EnableUI (False)
End Sub
The bolded line is where the error occurs. The thing is, I don't understand it cuz the image is what it is meant to be, and the code and images work somewhere else!!! so why not here? the image is in the right place and is right type etc, but i get this error>?
pls help!
Bob
Why Does This Happen
Hi, when ppl type in a text box I use the Replace command to change the < into another symbol.
However, when it does this (Im using OnChange) the sursor jumps to the begining of the text box (Tex1)
Why does it do this, and how do I stop it?
Why Does This Happen?
This code. Thanks to geoff_xrx and bloodeye!
It goes to the page url and lists the url until the list box has run out of space.
What it's meant to do is go to the url, look to see if the words specified are there if so list the url it is at!
Option Compare Text
Dim site(2) As String
Dim words(2) As String 'just a few words....you'll have to add them all
Dim siteNum As Integer
Private Sub Form_Load()
Web1.Navigate "http://www.riu.com.au/gold/secure"
site(0) = "http://www.riu.com.au/gold/secure"
words(0) = "Resource Service Group"
siteNum = 0
End Sub
Private Sub nextSite()
Web1.Navigate site(siteNum)
Do Until Web1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
siteNum = siteNum + 1
End Sub
Private Sub web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim itext As String
Dim x As Integer
Me.Caption = "site:" & siteNum & " " & URL
If (pDisp Is Web1.object) Then
itext = Web1.Document.documentElement.innerText
For x = 0 To UBound(words)
If InStr(itext, words(x)) < 0 Then
List1.AddItem Web1.LocationURL
nextSite
Exit Sub
End If
Next x
nextSite
End If
End Sub
Would There Happen To Be...
By any chance, would there happen to be an API function available
that would allow me to terminate a process by name (as it appears
in the task manager list) ?
Why Does This Happen
i my html editor i want to cover up a richtextbox while the html code in it is being colorized, so i have a picturebox over it and when i call the colorize function it sets it as visible and then does all the colorizing and then sets it as invisible. but the picturebox never shows unless i trace through the code. i guess it's just going thru so much code so fast that it never shows, but even when it takes about a minute to color the html it still doesn't. any ideas? maybe some way of pauing after setting it as visible, but i can't use a timer i don't think cause it's in a module, not on the forum. or are there ways of preventing people from clicking in or typing in the rtf box while it's doing this? i can't set it as not visible or as locked or not enabled cause i get errors with those. please help...
What Will Happen With VB?
What is the future like for VB, with the creation of VB.Net. Should I keep on learning VB or should I change to a new language.
What Does It Happen ?
Please show me where I wrong ?
When I want to use RichTextBox control, I must have richtx32.ocx ?
And richtx32.ocx can work if Riched32.dll or riched20.dll has been registered properly ?
Richtextbox control behavior does not depend on platform (win98 and win2k) if we use the same richtx32.ocx and riched20.dll?
If it correct then why I can not set background text color in Windows98 but I can in Windows2000.
(I got a sample at www.vbaccelarator.com)
Code is as follows :
public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (byval hWnd as Long, byval wMsg as Long, byval wParam as Long, byval lParam as Long) as Long
public Type CHARFORMAT2
cbSize as Integer '2
wPad1 as Integer '4
dwMask as Long '8
dwEffects as Long '12
yHeight as Long '16
yOffset as Long '20
crTextColor as Long '24
bCharSet as Byte '25
bPitchAndFamily as Byte '26
szFaceName(0 to LF_FACESIZE - 1) as Byte ' 58
wPad2 as Integer ' 60
' Additional stuff supported by RICHEDIT20
wWeight as Integer ' /* Font weight (LOGFONT value) */
sSpacing as Integer ' /* Amount to space between letters */
crBackColor as Long ' /* Background color */
lLCID as Long ' /* Locale ID */
dwReserved as Long ' /* Reserved. Must be 0 */
sStyle as Integer ' /* Style handle */
wKerning as Integer ' /* Twip size above which to kern char pair*/
bUnderlineType as Byte ' /* Underline type */
bAnimation as Byte ' /* Animated text like marching ants */
bRevAuthor as Byte ' /* Revision author index */
bReserved1 as Byte
End Type
dim charf as CHARFORMAT2
private Sub mnuFontBackColour_Click()
Dim ret as Long
on error GoTo error_cancel
charf.dwMask = CFM_BACKCOLOR
charf.cbSize = LenB(charf) 'setup the size of the character format
charf.crBackColor = vbRed 'value of RGB
ret = SendMessageLong(rtfText1.hWnd, EM_SETCHARFORMAT, SCF_SELECTION, VarPtr(charf))
Exit Sub
error_cancel:
''MsgBox "cancel "
End Sub
Or could you show me any URL about that ?
Thank you very much.
Why Do These Things Happen To Me
I have been developing an exe for some time it has been built and used for months no problems at all I have been working on it all week and running it all fine. Today I have made amendments and run it no problems, BUT all of a sudden when I try and run it or compile it it has decided not to recognise any of my public enumerations and is stating :
'Compile Error: Constant expression required'
AAArrrrgghh whats this all about
How Can I Make This To Happen
i want: when my project loades that if the database is locked (in use by a other copie of the project) that their is a message like "sorry database is in use, try again in a few minutes" and that the project will end itselves
the code
form_load()
if blabla.mdb=locked then
msgbox "sorry..."
end.
endif
end sub
isnt working
What Happen Of Call Sub ?
Code:
Public Sub LockTheForm(ByRef xx As Form)
Dim otext As TextBox
For Each otext In xx
otext.Locked = True
Next
End Sub
Code:
Private Sub Form_Load()
LockTheForm (Me)
End Sub
sub is in module and call form1 in mdiform it said
error 13 type missmatch
About VUMeter, What Happen? Help~~~~~!
Following source code to get the real-time volume of output or input channel, it say "cannot get meter control" error in WinXP, but run it under Win98 no any problem, why? Help me~~~~!!
Code:
Dim hmixer As Long ' mixer handle
Dim inputVolCtrl As MIXERCONTROL ' waveout volume control
Dim outputVolCtrl As MIXERCONTROL ' microphone volume control
Edit: Deleted rest of code
Logging In Before Anything Else Can Happen
Hi,
I am trying create a menu driven application. In order to do this, I want the user to be prompted to login to the application. If the user cannot login properly, I don't want them to be able to use the application. In other words, how can I protect the application from until a proper login is attained?
Thanks,
Jeff
I Knew It Would Happen...
You start programming in C++ for a couple of months and you forget how to do anything in VB. Can anyone help?
I am trying to use an array of buttons for a simple calculator demo. However, when I try to access the "click" procedure for each, it uses only one sub that is named
Private Sub Command1_Click(Index as Integer)
How do I make it so that when I click on Command1(3) it prints a 3.?
The button array thing is messing with my mind's concept of C++ arrays.
Thanks,
E.D.1870
Weird VB Bug! Does This Happen To You?
I've observed the following strange behavior in both VB5 and VB6 - seems like an IDE bug.
Try this (a multi-line statement with a "+" in the 2nd line):
Code:
x = _
a + b
Go back to the first line, remove the _, and the "+" in the 2nd line disappears!
Does that happen to you? Anyone seen this before? Weird!
Why The Heck Does This Happen
Hello I am getting something very strange when I try to import an excel sheet to access through code using select into or insert into..
Code:
dim cn as new adodb.connection
cn.open "Driver=Microsoft Excel Driver (*.xls);DriverId=790;DBQ=C: est.xls"
cn.execute "SELECT * INTO [;database=C: est.mdb].[Table1] FROM [Sheet1$]"
cn.close
set cn =nothing
if a field in the spreadsheet has a ., -, or non text or numeric character, it imports it as NULL.. is there ANY way around this? I have been trying anything I can think of. I sthere a better way to import through code? PLEASE help, I am completely out of ideas...
Thank you,
Thai
What Happen When A DLL Is Registered?
yeah, wha happen when a DLL file is being register in a system?
1)Is it necessary for a DLL to be register inorder to be use?
2)What is the good thing of registering a DLL?
3)What is the limitation when you din register a DLL to the system?
Why Does This Happen Playing Around With .move
Code:
public dim chasetimer
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If chasetimer = True And Button = 1 Then
Me.Move X, Y, Me.Width, Me.Height
End If
If Button = 0 Then
chasetimer = False
End If
If Button = 1 Then
chasetimer = True
End If
End Sub
this code is suppose to move where my mouse position is when i hold button 1(left button).. However when i hold the left button 2 image of my form appear why ?
Pause For Event To Happen
I'm trying to think of something that will have a program wait until something happens before proceeding. Specifically, I need the program to delay until the user clicks a button. I know that using a messagebox would do this, but my user interface requires that the program wait until someone presses a button on my form. Any suggestions?
Make Something Happen If Nothing Is Checked?
Hey guys I have a listview called report that has check boxes by the items, and when the user presses a button, it will proceed with the items checked, but is there a way to get it so if the user did not check any and still presses the button that somethign would happen?
Thanks!
Shouldn't WebBrowser1_DocumentComplete Happen Only Once?
Hi, I have a program that displays a popup message when the webbrowser control finishes loading a page. The problem is I get between 3-5 messages as the page loads, like its loading 5 pages.
I use the procedure for "WebBrowser1_DocumentComplete" so I figured once the entire page is done, this will run but it runs multiple times. Is there anyway to limit this to runs once at the end of the page download? the popup is displaying information it reads from the page and the first 1-2 messages are blank becuase the page hasnt loaded that far yet. any help?
What Happen To File Size?
Dim Temp as String
Open "c: est.gif" For Binary As #2
Temp = Input$(200000, #2)
Close #2
Open "c: est2.gif" For Output As #1
Print #1, sTemp
Close #1
....
File size of "test2.gif" is increased from "test.gif" about 2 bytes when I try to run above code. ( It happen in all file that I use in this code).
Strange Things Happen (Add In)
Recently my machine is added on a new server.
The problem I get know is there is nothing more in the Add In manager to select.
I've made a error add in to paste into all my subs and functions but have no option anymore to select it.
When I log in localy on the machine everything works fine , if i log into the network the add in list is empty.
I have all the rights on the server.
Does anyone know where i can find the registry settings for it , so i can adjust them for my needs.
Advanced thanks.
Error 372, Sometime Happen And Some Time Not
I hit the following error:
Run-time error '372'
Failed to load control 'ABC' from ABC.ocx. Your version of ABC.ocx may be outdated.
Make sure you are using the version of the control that was provided with your application
The strange thing is I run the same program, sometimes it has this error, and sometimes do not.
It happens when I display a form B. But before form B, display form A with the same control
do not have the error.
And form B not always have this error, just sometimes...
Anybody help?
Thanks
Events In Vb - Can They Happen Anytime ??
I have a project contain 2 forms : Form1 , Form2 .
In the Form1_load I also load Form2 :
load Form2 (command line)
But Form2 is still hidden while Form1 shown.
Form1 contain only a button (click event use)
Form2 contain a control that load pictures (not by microsoft).
When the button in Form1 is clicked the command (event) is for loading a picture to the picture control in Form2 - but still do not show it yet!
This control in Form2 has an event called StatusChanged - happens when a picture file is loaded to this control.
The problem is when the picture file is loaded while clicking the button in Form1 - this event StatusChanged don't accure , it only happen when the Form2 is shown , why ??
What can I do so the code written for this event will happen anyway ??
Bad Thing Happen To Bad People??
My hard drive thought it would be funny to damage some of the files for VB. When I went to reinstall VB from my copy I found that my CD was scratched bad enough where it was unusable. So I go to use a copy of VS 6 enterprise from a friend of mine (Which who knows where he got his copy from) and I get the error during install that it could not load file rvbrewiz.dll. That could be due to the fact that it is missing all together from his copy. After searching long and hard I can't seem to find a copy of that .dll. Could someone be kind enough to send me one. bheath@pcwa.net
Thanks
What Happen When Quit From Application
Dear All,
My application in VB.Net backend SQL server2000.
In my Application has one procedure, which executes while closing the application. Some times the application gets stuck, because of the speed, in this times I am using Taskmanager, for closing the Application. While closing in this way (Using task manager), if the application opened in one screen (if it is only MDI screen) this time it fires the procedure, if the application contain more than one screen it is not executing.
I need to execute that procedure necessary in my Application while Closing either normal or using task manager.
That procedure contains no user input or output. Only database process.
Can u explain and give me the soln.
Thanks in advance
jose
What Happen To Vbaccellerator SGrid2 ?
Hi , just wondering is there anybody knows
where i can find the newest information about bug fixes or improvement about vbaccellerator sgrid control?
because the web site(vbaccelerator.com) just not updating anymore....
thanks..
{Winsock Crashing Program} Why Does This Happen
when i connect to winsock, recieve data then close the program Visual Basics crashes, but if i dnt recieve any data this doesn't happen.
Code:
Private Sub cmdStrt_Click()
For i = 0 To 15
lstID.Selected(i) = True
CurID = lstID.Text
ws(i).Close
ws(i).Connect "profiles.yahoo.com", "80"
Call MoveDown(lstID)
Do Until ws(i).State = sckConnected
DoEvents
Loop
Next i
End Sub
Private Sub ws_Connect(Index As Integer)
iData.Text = ""
strURL = "http://profiles.yahoo.com/" & CurID
strMsg = "GET " + strURL + " HTTP/1.0" + vbCrLf
strMsg = strMsg + "Accept: */*" + vbCrLf
strMsg = strMsg + "Accept: text/html" + vbCrLf
strMsg = strMsg + vbCrLf
ws(Index).SendData strMsg
DoEvents
End Sub
Private Sub ws_DataArrival(Index As Integer, ByVal bytesTotal As Long)
ws(Index).GetData rData
DoEvents
iData.Text = iData.Text & rData
End Sub
Private Sub imgXdwn_Click()
X = 0
Do Until X = 16
ws(X).Close
X = X + 1
Loop
End
End Sub
Thats all the code i have that includes anything to do with winsock.....can anyone spot anything wrong?
Stopping Duplicates Before They Happen In A List
I am making a yahoo profiler for a friend, this program runs of Yahoo! Messerngers profile servers, but the thing is..when the winsock recieves the data from the server if somewhere in the string it finds "not valid" then it exits the sub and moves on to the next name, but if it does find that string it adds the name to the list. well my problem is that it adds a duplicate also, like if the name was found for "bob" it would add bob twice to that list box, is there a way to after it adds it the first time to stop it from adding it the second time, like after the List1.AddItem events to search through the items in the list box and delete the duplicates? Please someone help..
Why Dont Things Happen In The Right Order?
Code:
Private Sub Command1_Click()
AppActivate ("Planetarion Round 7 Battle Calculator - Microsoft Internet Explorer provided by BTopenworld")
Sleep (2000)
SendKeys ("^(ac)")
Sleep (2000)
AppActivate ("Microsoft Excel - Book1")
End Sub
From wot I see, this should:
make the IE window active, wait 2secs, send <ctrl> + a + c (to select all/copy), wait 2 secs, then make excel the active window.
Both IE and Excel are open, yet the select all/copy doesnt happen in the IE windo, but in the excel window, can anyone see why, or a better way to do it? (keep in mind im reletively new to VB please)
Make Things Happen Randomly
I need to make stuff happen randomly. I was wondering if anyone could tell me a few ways to make things happen radomly.
thanks
Counting Seconds While Other Things Happen
I've written a application that looks at a service and then pauses for 1 second and checks again.
This is fine, but whenever I restart the service, my application just freezes.
I'm using Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Is there another way of 'pausing' my application for a second without it completley freezing whiles restarting the service.
Thanks in advance.
|