Comatose 290 Taboo Programmer Team Colleague

Do you already have code for this (naturally, not all of it, or you wouldn't be asking) but my question is... have you started the project?

The layout of how I would go about it, is I would make a query for the birth year, and then retrieve all the information about each record for that birth year.....so, if they search by 1979, the database would return a list of records for 1979. Then I would store all the information in arrays for every record in 79, and sift through it in the vb code..... let me know where you are with this, and where I can help.

Comatose 290 Taboo Programmer Team Colleague

Boy do I feel foolish.

Sheets("Name of sheet").Select
Sheets(index).Select

Dont code while tired kids, makes you do some crazy things.

That's how you change the active sheet.

Comatose 290 Taboo Programmer Team Colleague

First thing is first, download Hijack This and then run it from it's own folder. Then post the log that it generates in your next post.

Comatose 290 Taboo Programmer Team Colleague

Net send is a command line utility that comes with later versions of windows. It's layout is: net send IPADDRESS Message
So, for example, if you wanted to send a message to the IP Address 202.9.101.10 (made up) then you would do this:
net send 202.9.101.10 hello world!

Now, keep in mind that the messenger service has to be running on BOTH computers for this to work. To see if it's running, go to the control panel, administrative tools, services... then scroll down the list and look for "messenger service" and make sure it is enabled and started. Again, this is required on the machine you are sending from, and on the machine you are sending to.

There is a scam going around, where someone figured out that XP with SP1 left the messenger service ON by default (it's off by default in SP2), and they created a program to do net send commands to lists of IP addresses, advertising a program that would shut off the messenger service.... anyway, messenger service (not to be confused with msn messenger, they are NOT the same) must running on BOTH machines for it to work.

Comatose 290 Taboo Programmer Team Colleague

You put Knoppix on a CD, and it becomes "bootable", but it's a version of unix, and I'm not so sure that it's as user friendly as PTY suggests.... I suppose the right distro is.... anyway, you put the CD in, turn off the computer, then turn the computer on (with the CD in the drive) and boot to the CD.

Comatose 290 Taboo Programmer Team Colleague

I'm guessing you are talking about the programs in the system tray (next to the time), and that you are talking about on startup. If you are not talking about on startup, then you can usually remove icons from the system tray by right clicking on the icon, and choosing close, quit or exit.

There are two places where windows allows these to load from. From the startup program group (start button, Programs, Startup) and in the registry. The registry is a large database of settings and characteristics for how programs and windows behaves when run. There are a number of places in the registry that can load things on startup, and luckily, most versions of windows have a tool that gives you access to these. Try going to start, run, and type in "msconfig" without the quotes. Then click "ok" and you should get a new window (System Configuration Utility). Click on the "startup" tab and that will give you a list of items that are loading on startup.

It's a good idea, though, to thoroughly research each item that you plan to remove before removing it. You could inadvertently remove a program that your computer needs to be stable or function correctly. For example, some sound drivers, or video card software.... even anti-virus software will load in these places. So, what I mean is, make sure you know what you are removing before doing so....

EDIT: Yeah, What He Said Above ;)

Comatose 290 Taboo Programmer Team Colleague

Where does the variable "ClockTime" get it's data from?

Comatose 290 Taboo Programmer Team Colleague

You can use the show and hide
if you have tow forms form1 in which your command button is placed and form2 the one you want to go to when you click the button you can easily write in the click event of the command button

Private Sub Command2_Click()
form1.hide
form2.show
End Sub

Nice Post lover99509, but it should be also noted that using the .hide and the .show method is significantly slower on benchmark tests than directly altering the .Visible property itself....

Comatose 290 Taboo Programmer Team Colleague

Good Work Here PG

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

One of the most important things to understand when automating office, is that it's heavily [search]OOP[/search], and therefore you are forced to work with objects. In order to create an object that is external to your application (for example an office application, whereas a button or textbox would be internal to your application), you have to tell VB that you want to make an object. This is where the createobject function comes in, allowing your program to create an "instance" of a class so that you can manipulate its object.

CreateObject can take two arguments, the second of which (ServerName) has to do with the computer that the object was created on in a network, and will cause more trouble than it's worth. The first parameter (Class), however, allows you to make an object of a given type. So, if you want to make an office application you could set oApp = createobject("Office.Application") . Naturally you can't leave the "office.application" just like it is. It has to know which application you want to mess with (be it Word, Excel, etc), so in order to create a Word object, you can do some fancy stuff like set oApp = createobject("Word.Application") , and your application will create a new Word application. You can refer to your copy (Instance) of Word with the Object Variable oApp.

What is that you say? You don't see a copy of Word anywhere? That's because you haven't done anything with the properties just yet. The …

Comatose 290 Taboo Programmer Team Colleague

Good Call

Comatose 290 Taboo Programmer Team Colleague

Good Job Hollystyles

Comatose 290 Taboo Programmer Team Colleague

So, It is all working correctly?

Comatose 290 Taboo Programmer Team Colleague

what are links to free registry fix problems. What are the best spyware removers.

http://www.sofotex.com/RegScrubXP-download_L7528.html
Hijack This

Comatose 290 Taboo Programmer Team Colleague

Nor I..... Pages are loading fine....

Comatose 290 Taboo Programmer Team Colleague

I think a listbox is a bit more difficult to work with.... If I'm not mistaken, you'll have to do it all manually, such as using the "additem" property of the listbox..... you can use the sendmessage API call to force the listbox to use columns and keep the data orderly, but I think a listview would suite your needs better.

Comatose 290 Taboo Programmer Team Colleague

You should be able to use createobject, and create the object in question.... for example:

dim wsh
Set wsh = CreateObject("WScript.Shell")
wsh.run "c:\windows\notepad.exe", 1, 0

Which should create the WScript Shell object, and then launch it's "run" method to spawn notepad...

Comatose 290 Taboo Programmer Team Colleague

No, it's not a windows thing I can tell you that (if it is, it's a service disabled on my XP Home box). I think it has to do with your video card drivers or software.

Comatose 290 Taboo Programmer Team Colleague

It is right. It is also right (but much more difficult) using directX

Comatose 290 Taboo Programmer Team Colleague

For what you want to do, your code is way to static (doesn't change). You want to search a directory, by the info in a cell of an excel document...... you need to be able to change which directory you are searching, and what name of the document you need..... when I get home from work, I'll make it open the document in excel.

Comatose 290 Taboo Programmer Team Colleague

What kind of video card do you have? I know NVIDIA offers NVRotate, which allows you to rotate the screen (believe it or not, they have monitors that can be rotated, I guess it helps in graphic design or some crap, and this allows you to make your monitor longer or taller or whatever you want, and still keep things normal looking). If you use ATI, I'm sure there is a tool that does this too.... as far as I know, windows doesn't do this on it's own (though I could be wrong)

Comatose 290 Taboo Programmer Team Colleague

I should merge this and your other thread, since they are about the same topic.... but for now, I'll leave them be. The code you posted only searches through the grid of the excel document, and (as far as I can tell) never onces looks at any kind of filename. I can code a sub/function to do what you want.... the problem we are facing is that this will be done strictly in VB6 Code. Yes, there is a difference between VB and VBA, but it's not extreme... and the problem is that I don't know how much (if any) of the commands/keywords that vb6 has are not in VBA. I know that vb6 has some additional commands, and certainly added power that you simply can not harness with VBA, but I'm not sure (since I don't use office) if the code will work 100% as is.... so try this sub, and let's see where we need to modify.... baby steps.

Public Sub GetDocumentStr(PartOfFileName, FolderToSearch)
If Right(FolderToSearch, 1) <> "*" Then
    If Right(FolderToSearch, 1) <> "\" Then FolderToSearch = FolderToSearch & "\"
    FolderToSearch = FolderToSearch & "*.*"
End If

TFname = Dir(FolderToSearch)
Do While TFname <> ""
    If InStr(1, TFname, PartOfFileName) <> 0 Then
        Exit Do
    End If
    TFname = Dir
Loop

If TFname = "" Then
    MsgBox "None Found"
Else
    MsgBox TFname
End If
End Sub

Now, that Sub only does part of what you want.... it searches a folder you give it, for a part …

Comatose 290 Taboo Programmer Team Colleague

Yup, or you can get real crazy, and use directx :eek:

Comatose 290 Taboo Programmer Team Colleague

You should make sure that those OCX file are the latest versions (up to date). It's possible that your app is working with an earlier or later version than what is on the system.... and as maheshsayani was saying, are you running the EXE?

Comatose 290 Taboo Programmer Team Colleague

No It isn't....

Comatose 290 Taboo Programmer Team Colleague

A Combination of using the CreateWindowEX API, with a class of TOOLTIPS_CLASS, and then set it's style of TTS_ALWAYSTIP. The tooltip window would be a child of your form, and thence destroyed when you close your form..... Let's see...http://www.thescarms.com/vbasic/tooltip.asp

Comatose 290 Taboo Programmer Team Colleague

Right. Actually all types must be declared either in a module, or in the declarations section of a form. If it's in a form's declaration, it must be set to private.

Comatose 290 Taboo Programmer Team Colleague

Sorry about that, vBulletin assumed the trailing ) as part of the URL, but it's not: http://support.microsoft.com/?kbid=311272

Comatose 290 Taboo Programmer Team Colleague

After some pretty hard-core searching, I've settled on the fact that you simply can't by yourself. I've looked into API's, WMI, and using Sendkeys to the device manager window itself :eek: (which works, btw, but it's really tacky, and certainly not something I'm going to suggest). After all is said and done, it looks like there is a utility called "devcon" from microsoft, that can be used to do what you want (http://support.microsoft.com/?kbid=311272). I'm quite a bit disappointed that I can't find a VB solution to this, or even a solution in another language that I could port to VB. Everything seems to rely on this tool...... good luck.

Comatose 290 Taboo Programmer Team Colleague

Oh!

Well, you see, BOF isn't a valid function (not built into VB anyway). So when you try to call it with your while loop, it flips out. BOF is supposed to be Begining of File, but (as far as I can tell) it only works as a property of a database object..... such as access or SQL (for more on doing that http://www.timesheetsmts.com/adotutorial.htm). Since you are just opening a sequential file, BOF is not recognized by VB, and therefore causes a problem that crashes the app, which stops it from writing at all.

Comatose 290 Taboo Programmer Team Colleague

And that needed a Poll?

Comatose 290 Taboo Programmer Team Colleague

You are trying to write the contents of variable "textToWrite" to a file. So, you only need to write it once. The only time you might need to write it more than once is if the variable will change (for example, you are copying data from 1 file to another), but this code will work fine:

Open filepath For Output As #filenum
    Print #filenum, textToWrite
Close #filenum
Comatose 290 Taboo Programmer Team Colleague
Open filepath For Output As #filenum
   While BOF(filenum)
    Print #filenum, textToWrite
   Wend
Close #filenum

How many times are you trying to write the variable "textToWrite" to the file?

Comatose 290 Taboo Programmer Team Colleague

You need it to search the entire drive, for a file name that contains the string in a specific cell of an excel document?

Comatose 290 Taboo Programmer Team Colleague

You can use Perl with XLIB.....

Comatose 290 Taboo Programmer Team Colleague

Hmn, are you emptying the record (setting all the fields to "") or are you actually calling the ADO's delete method?

Comatose 290 Taboo Programmer Team Colleague

try breaking that up into variables.... like thetext = CStr(Result.PhraseInfo.GetText) and then call checkword(thetext), and see if that helps... also, try msgboxing result.phraseinfo.gettext, beyond that.... what is phraseinfo?

EDIT: n/m I see that phraseinfo is a part of the object for the speechlib.... try msgboxing it, and see if it returns the proper values....

Comatose 290 Taboo Programmer Team Colleague

Ok.... I'm not sure exactly what it's going to entail.... do you have the buttons already added for the scientific portion? Attach your project to the next post, and we'll go from there.

Comatose 290 Taboo Programmer Team Colleague

1. Remove the While Wend, You aren't reading the file, therefore have no need to loop through it.... just write the variable. If you "appending" the data, as you stated above, you'll need to open the file for append, and not output, since output will over-write anything in the file, for the new information. See if it fixes either of the other 2.

Comatose 290 Taboo Programmer Team Colleague

Do you know of a good text editor for php, preferably ones that shows errors if the code ain't right?

VIM for windows (and golden pen) have syntax highlighting ;)

Comatose 290 Taboo Programmer Team Colleague

Yeah, give that a shot.

Comatose 290 Taboo Programmer Team Colleague

the data that is streaming, is it from a server? For example, does the program have to connect to the server that streams, and then get the live data?

Comatose 290 Taboo Programmer Team Colleague

Can you point out the line that is causing the error?

Comatose 290 Taboo Programmer Team Colleague

Some swear by it, others swear at it. I'm in the latter group. I wouldn't suggest it if you plan to be doing web pages (though, you can do web pages with it, I wouldn't suggest it). To be honest, I think notepad is the best answer (or some other text editor that does syntax highlighting, like VIM For windows, or Golden-Pen) to learn how to code HTML/Javascript with. If you learn from that level, everything else will just make sense.

Comatose 290 Taboo Programmer Team Colleague

TGreer may have a better explanation, but at the gist of it, HTML isn't 100% XML compatible. There are syntax issues, because HTML doesn't demand that you "close" every tag that you open. For example, most of the time in HTML, you have to start a bold tag <B> and then close it when you no longer want bold text </B>. <B>This would be bold</B>. Sometimes though, such as the HR, BR, and Image tags, there is no closing tag for them.... so <BR></BR> is just silly, because it's just a line break, not a tag that needs a start and a finish..... XML demands that all of the tags that are opened, be closed as well (like the <B> tag). So, what do you do for tags that have no closing cousin? You add a /. So, you could do a line break like this: <BR />, and that would be XML Compliant. I might be a little off, but on the very base of it, I'd say that XHTML is XML Compliant HTML..... if that makes any sense.

Comatose 290 Taboo Programmer Team Colleague

That's an excel divide by 0 error.... is your app doing something with excel? If so, maybe
A) Excel is not install on the client machine
B) Wrong version of excel for the method/operation your app does
C) problem with a calculation in the excel document

You could TRY throwing in an on error resume next just before the saveas line, or an on error goto handler , but then you need to make a handler: label to goto. I don't know if that will work or not, because if the error is with the excel object, your app will have little or no say in the objects internal error handling technique.....

Comatose 290 Taboo Programmer Team Colleague

ouch, can you be more specific? Like, you want to make a program that logs the real time data from another program? What is the other program, and what is the data?

Comatose 290 Taboo Programmer Team Colleague

A Table, as in, an access database?

Comatose 290 Taboo Programmer Team Colleague

SpInProcRecoContext, is it a third party download?