|
I´ve got a really strange problem
One of the windows in my app (´mdi app) has a vertical scrollbar, if I run the app within Visual Basic (by pressing F5) I can scroll the window content with the mousewheel but if I create an exe-file and run it from Windows Explorer I can´t (if I click the arrows on the scrollbar the window content is scrolled). Does anybody know what could be wrong????
Olle
|
|
|
|
|
The help file says VB uses pass-by-reference as a default(byval to use pass by value) - but the simple test I do in an Excel module isn't working
Public testnum
-----
Public Sub makebig(inpt)
MsgBox "Make big receives = " & inpt
inpt = inpt + 1
MsgBox "Input now is = " & inpt
MsgBox "testnum now is = " & testnum
End Sub
---
Public Sub test()
testnum = 1
MsgBox "Before = " & testnum
makebig (testnum)
MsgBox "After = " & testnum
End Sub
test() does not change testnum, Before = 1, After = 1
what is happening?
Thanks heaps
|
|
|
|
|
Change line that reads:
makebig (testnum)
to
makebig testnum
If you use parentheses here it assumes that parameter you pass is not a variable but a result of an expression. Therefore instead of passing address of your testnum variable it passes an address of the result of the expression.
|
|
|
|
|
Try this
<p>Option Explicit</P>
<p>Public testnum As Integer</P>
<p>Public Sub MakeBig(inpt As Integer)
MsgBox "Make big receives 'inpt' = " & inpt, vbOKOnly, "In MakeBig()"
inpt = inpt + 1
MsgBox "'inpt' now is = " & inpt, vbOKOnly, "In MakeBig()"
MsgBox "testnum now is = " & testnum, vbOKOnly, "In MakeBig()"
End Sub</p>
<p>Public Sub Test()
testnum = 1
MsgBox "The original value of testnum = " & testnum, vbOKOnly, "In Test()"
MakeBig testnum
MsgBox "After MakeBig()= " & testnum, vbOKOnly, "In Test"
End Sub</p>
Paul Lyons
Do not go where the path may lead, go instead where there is no path and leave a trail.
- Ralph Waldo Emerson
|
|
|
|
|
I'm somewhat new to vb, although i feel like i know what im doing. I have a external program (not a excel macro) that I want to load a comma delimited file into. I need to load it and add up a few fields. Nothing complicated I'm sure, but I need some help on how to load the file into a excel worksheet (or whatever is best to do it with). Thanks in advance if you can help.
|
|
|
|
|
Instantiate an Excel Application object (try get before you try create) and use the Excel object model to load the CSV.
If it was me I'd use the filesystem object (part of scripting) and then parse it with the Split function into an array or some such, but I gues that dependes on where and what you want to do with the data.
|
|
|
|
|
In internet explorer when we type in the url at address bar then we get a list of dropdown of urls (guesing that they are coming from the registry). I have created a combobox in vb, i want whatever new entry is entered in the combo box should be added to registry and also the earlier entries should be visible when we click the dropdown of the combo box.
|
|
|
|
|
It may not be a good idea to store it in the registry. Probably saving a certain number say 10 - in a local file should serve the purpose. But if you need to store that in registry - see GetSetting() function.
|
|
|
|
|
Hello fellow developers!
I have a problem. I am trying to optimize some database transfer code and I am stuck.
Here is a brief introduction to what I have today:
The database is a Jet 3.5 database with a lot of tables. The tables I want to update are linked together like this (PK):
Shelf(ShelfNr)-->Inventory(ShelfNr,ArticleNr)<--Article(ArticleNr).
ArticleNr is a unique number but ShelfNr is based on an auto-counter field. The problem with this that I cant use batch updates (through an ODBCDirect workspace) and at the same time use code like this:
' Pseudo VB-code
rsShelfTo.AddNew
' copy all fields except key
rsShelfTo.Fields = rsShelFrom.Fields
rsShelfTo.Update
rsShelfTo.Bookmark = rsShelfTo.LastModified
' CurrentShelf always gets the value 0 with this code, why?
CurrentShelf = rsShelfTo.Fields("ShelfNr")
I would like to include all updates in a transaction some my question is can I switch between using dbUseClientBatchCursor and dbUseDefaultCursor and still keep the transaction alive?
Any ideas?
--
Mattias Wahlberg
IDNet
|
|
|
|
|
Hello,
I've got a problem regarding PowerPoint XP. In Office 2000 the following lines worked just perfectly:
Dim ppApp As PowerPoint.Application
Set ppApp = New PowerPoint.Application
With PowerPoint XP I always get the error message: "ClassFactory cannot supply requested class". It works fine in VBA (code entered directly in PowerPoints VB Editor) but not from Visual Basic.
Can anyone help?
Thanks,
Ruediger
|
|
|
|
|
I am planning to make a pretty big program (compared to what I have done already) and I am pondering the possibility of creating the program so that it can use plugins. What I am wondering is if this is a reasonable/easy type of thing to do. And is it really worth it in most programs. I am planning to make the program fairly dynamic as it is. (dynamic being synonyms with generic)
Either way I am also wondering if anyone can point me in the direction of a good resource on how to make a program that can use plugins.
Thanks for any help and advice you give
Quinn
(a.k.a Monkey Joe)
|
|
|
|
|
Has anyone created an email server using VB? Is it even possible to do without killing server resources? I want to write one, a plain one, nothing fancy, just a basic email server to send and receive email, maybe a web interface, for few users (maybe 5 max users). Any links or anything out there to try and do this?
-Nick
|
|
|
|
|
Hi,
Is there any way to check the HRESULT returned from a COM Method
in a VB client ?
Thanks,
Firoz
|
|
|
|
|
I am not sure whether you can see the HResult. But if the HRESULT is not equal to S_OK, I think Vb raises an exception with err.number equal to the hresult.!!
|
|
|
|
|
I wish to develop a software on my own for LAN in office so that users can chat(text) through it.Can i get help from Anywhere ?
saxenashobhit@rediffmail.com
|
|
|
|
|
There is a really simple version of a server/client chat program in the MSDN for visual basic. You may be able to use that as a base for one (to help you learn what needs to be done).
If you search for "Using the Winsock Control" in the MSDN you should come up with the 'page' that has the simple version of a chat type program.
I played with this myself a bit and it is fairly easy to understand.
Hope that helps some.
Quinn
(aka Monkey Joe)
|
|
|
|
|
dear sir,
My name is gautam, i am software proffessional and make my software in VB6.0,
I want to make one good software for Cyber caffe.
I want some support from your side for making this software,
If you agry with me then
plz mail me as soon as possible, I am waiting for your reply
Thanks
Gautam
(India)
Email: ewebgautam@rediffmail.com
|
|
|
|
|
I need help to create a custom IE Toolbars in Visual Basic like Google or Yahoo does.Please help me I am in damn need of it .
I need the help specifically in Visual basic as i dont know C++.
A piece of Code in VB will be helpful ...........
|
|
|
|
|
Hello Gaurav,
I have the Pure VB Code to make IE Toolbars like Google and yahoo. See the screenhots of the toolbars developed using this code at www.chadhaajay.net
|
|
|
|
|
I need help to create a custom IE Toolbars in Visual Basic like Google or Yahoo does.Please help me I am in damn need of it .
I need the help specifically in Visual basic as i dont know C++.
|
|
|
|
|
Here is some information on the subject in C++
Hope this can lead you in the right direction.
Deskbands
Nick Parker
|
|
|
|
|
Hello,
In our project, we have about 30 VB projects.
Pl. tell me a way to batch compile them so that I can just do a "get latest" on VSS & then batch compile them.
Regards,
~A.
|
|
|
|
|
Look at the command line parameters for vb6.exe:
vb6.exe /?
|
|
|
|
|
How do you read a file into a variable after opening the file?
|
|
|
|
|
Something like this should do it
Dim strFileName as String
Dim Data as String
Dim strVariable as String
Open strFileName For Input as #1
Do Until EOF(1)
Line Input #1, Data
strVariable = Right(Data, 5)
...Do something with strVariable
Loop
Close #1
Nick Parker
|
|
|
|