Problem with Visual Basic
have small one worries to open a file m-lines since visual BASIC 6.0. I use the instuction shell with the following synthaxe:
Shell "C:\Program files\Matlab\Matlab.exe E:\Work\Simulation\Project.m"
in program VB6.0, but the file does not open, and I am made to write this so that this works better:
Shell "C:\Program files\Matlab\Matlab.exe"
Shell "C:\Program files\Matlab\meditor.exe E:\Work\Simulation\Project.m"
But when I use these instructions Matlab open and plan opens with the editeur of text, it is therefore impossible to me to execute project with the Ma...Visual Basic Problem
If you have VB Problem or big MS related project contact me for help with
outsourcing the development. We have facility in Vietnam.
The Outsourcing Expert
> We have facility in Vietnam.
And is that the Visual Basic Problem you are refering to in your title?
...visual basic problem
I have code that exports data to excel and formats it. I originally
put it into the on click method; however, it has not gotten too large.
I want to split it out into different modules; however, I am not sure
how to start formatting an open excel file. What I have done is export
the data, open the file and then do some initial formatting. The next
"function"? would be to do more formatting on the open excel file. Is
there a way to do this? It seems like I need to re-declare the excel
Thanks for any help you can give.
Oh my, yes. If you create an instance of Excel in your VBA code that then
opens the worksheet for you there is a huge amount of stuff you can do.
<firstname.lastname@example.org> wrote in message
>I have code that exports data to excel and formats it. I originally
> put it into the on click method; however, it has not gotten too large.
> I want to split it out into different modules; however, I am not sure
> how to start formatting an open excel file. What I have done is export
> the data, open the file and then do some initial formatting. The next
> "function"? would be to do more formatting on the open excel file. Is
> there a way to do this? It seems like I need to re-declare the excel
> file somehow.
> Thanks for any help you can give.
Also, here is some of the code that I have:
on click event:
Dim strSpreadsheet...Visual basic subtraction problem
While working on VB , recently I have faced a decimal sutraction
problem as mentioned below.
For example :
Current VB problem
2.15 - 2.10 = 4.999999999999999E-02?
Where as result should have been 2.15 - 2.10 = 0.05
Current VB problem
0.96 - 0.92 = 0.0399999999999999.
In this case also the result should have been = 0.04
This problem is greatly exasperated in cases were lots of data is
If anybody has a solution to this problem. Please respond.
thanks in advance.
> Hi folks,
> While working on VB , recently I have faced a decimal sutraction
> problem as mentioned below.
> For example :
> Current VB problem
> 2.15 - 2.10 = 4.999999999999999E-02?
> Where as result should have been 2.15 - 2.10 = 0.05
> Current VB problem
> 0.96 - 0.92 = 0.0399999999999999.
> In this case also the result should have been = 0.04
> This problem is greatly exasperated in cases were lots of data is
> being processed.
> If anybody has a solution to this problem. Please respond.
> thanks in advance.
vb commonly introduces small rounding errors (1E-15) when using floating
point numbers. the result you get is the best you can expect from vb.
maybe you can round the result from a substraction to the number of
digits you desire and can trust.
On 21 Jul ...I have do while loop problem in Visual Basic
I am having a problem with Do while loop with my logic. Here is my
scenario, I have a text file reads below
John Doe, 1234, programmer, 312-333-3333, xxxxx, xxxxx, xxxx
Mary, Ann, 3456, secretary, 312-234-4567,xxxxx, xxxxx, xxxx
my program compile the first three column into an account ID and then
put account ID search in the Active directory,
if account ID is found, then I want to update that account ID's
attributes such as telephone number, etc...
if no account ID is found, exit and keeping looking for the next
I get problem in the last part, so far, once in the looping, my code
can only recognize the last line in this case, I can
only update Mary Ann's account, but it skip the John Doe's stuff.
Can anyone help me out, I have been fixing this code for while, thanks
in advance, below is my code
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.ReadLine
arrServiceList = Split(strNextLine, ",")
strFirstName = Trim(arrServiceList(0))
strMiddleName = Trim(arrServiceList(1))
strLastName = Trim(arrServiceList(2))
ssn = Trim(arrServiceList(3))
FirstName = Left(strFirstName, 1)
LastName = Left(strLastName, 7)
strAccoun...problem with dll in visual basic
I'm using a dll created with comtool in a Visual Basic application
and when i try to run it I get the following error from VB:
I've searched over the net, and found that the you get this error if
the dll is not properly registered in the system.
I've tried to manually register the dll with regsvr32 command and get
the following message:
Loadlibrary("c:\temp\sqq.dll") failed - The specified procedure could
not be found.
where sqq.dll is the dll I get from comtool.
By the way, I...Visual Basic 6 Problem
Does anyone know how to create an ActiveX EXE Server that raises events
which can be captured by muliple clients?
So, I have two applications that are both clients. I need to pass data via
the activex exe from one application to the other. The messages will be
"captured" as in the event handler, the code will check one of the
paramaters that contains a simple string that represents the recipients
"address" (these strings could be just "App1" and "App2".
I've tried to do this but it only raises the event in the application that
is sending the message. I need the event to be raised in both applications.
I have the ActiveX EXE properties set to "MultiUse" and using a Thread Pool
Any help or advice would be very welcome as this is really causing me some
Because of the troubles with "built-in" events, I switched to using
java-style events: The server defines an interface that standardizes the
sending and/or receiving of the messages. The clients then have objects
that implement that interface, which are handed to the server. The
server now communicates through those objects.
Darren Brook wrote:
> Does anyone know how to create an ActiveX EXE Server that raises events
> which can be captured by muliple clients?
> So, I have two applications that are both clients. I need to pass data...Visual Objects compared to Visual Basic and Visual C.
Who can explain me why I have to use VO instead
of VB or VC? OR is is there no difference?
With kind regards
Rob van der Ploeg
Every language has his (dis)advantages. The ones you mention are all
wrappers around the Win32 API.
VO is a very nice and easy language compared to VC. Data-access is famous
with VO, but also memorymanagement, the cargage collector, ragged array's.
and the result is fast and reliable code. You do not have to declare every
variable if you do not want to. (but you will)
Comparing to VB is VO a real OOP langangue where VB is not. You can write
your own classes, inherit classes from VO classes or from your own classes,
Overide methods, use both strong and loose typed variables, write early and
late bound code
VO comes with a SDK containing the sourcecode of the part of VO written in
VO (almost everything except f.i. the compiler)
With VO you get this newsgroup, where almost every question is answered
VO has a prof. usergroup in the netherlands, check www.sdgn.nl. with very
often very well organised conferences. I think it is the best organised
usergroup in the world.
VO is limitted to the Win32 api. A .NET version is announced, but withoot a
More inforrmation about VO can be found at www.cavo.com
"Mobi-Data Helpdesk" <email@example.com> schreef in bericht
> Who can explain me why I have to use...Visual Basic V6 ADODC Problems
Im creating the front end for a database created using microsoft
I have set up the connection strings and record sources for everything
but the information will not show up in the text boxes when the
programe is run.
The error is:
"run-time error '91':
Object cariable or With block Variable not set"
I have checked and everything is spelt correctly the same programe
works on my computer at college but not at my home. All the relevant
information has been changed for the location of the database.
Can anybody help me out please?
Don't know if this will help but according to MSDN:
] When you attempt to access the Recordset object of an ADO
] DataControl whose Connection and RecordSource properties have
] been set, the following error message results when the ADO
] DataControl does not have any controls bound to it:
] Run-time error '91': Object variable or With block variable not
] The Connection and Recordset objects of the ADO DataControl do
] not get implicitly initialized unless the DataControl is bound
] to a control on the form that contains it.
] Bind the ADO DataControl to a control on the form before
] attempting to access its Recordset object. You can then set
] the visible property of the control to False if you do not want
] the control to be displayed at run time.
] Call the ADO DataControl's Refresh method prior to accessing
] its Recordset object if you do not wish to bin...Another embedded visual basic problem
I downloaded eVB (from the MS website) onto my PC. I transferred the file (being a "cab" file) to my PPC using the explorer on activesync 3.8. But when I try to run the file from my PPC, I get the following message: "The file ... is not a valid windows CE Setup file".
My PPC (the i-mate JAM) uses Windows Mobile 2003, Second Edition.
What am I doing wrong?
Message posted via http://www.pocketpcjunkies.com
Hayden Scott via PocketPCJunkies.com wrote:
> I downloaded eVB (from the MS website) onto my PC. I transferred the
> file (being a "cab" f...Setup.exe Visual Basic problem
Hello All i have created a app for AIM and WIN combined but the program will
not run right unless u have a certain .ocx does anyone know how to make a
setup file to where it will install the program and add that certain
Frank R. Jr.
Frank R. Jr. wrote:
> Hello All i have created a app for AIM and WIN combined but the program will
> not run right unless u have a certain .ocx does anyone know how to make a
> setup file to where it will install the program and add that certain
Look for the "Package & Deployment Wizard" in your visual basic program
ok thank you but i have found a pretty neat program install-us it makes a
install file and it was just what i needed
"jamie" <firstname.lastname@example.org> wrote in message
> Frank R. Jr. wrote:
> > Hello All i have created a app for AIM and WIN combined but the program
> > not run right unless u have a certain .ocx does anyone know how to make
> > setup file to where it will install the program and add that certain
> > componet
> Look for the "Package & Deployment Wizard" in your visual basic program
...Visual Basic Multiselect and SelectedIndexChanged problem
I have a program with a ListView (with Multiselect) and am using the
SelectedIndexChanged handler. However, when the index is changed, a
rather long set of events occurs which takes quite some time.
Therefore, if the user tries to multiselect several items (holding
down Shift), it takes that many times longer. Is there a way to only
invoke the SelectedIndexChanged method on the LAST multiselected item
(not each and every one)?? That would speed up the process greatly.
This sounds like a .net question as there is no SelectedIndexChanged event
in VB. Theref...Problem Closing Visual Basic Help Window
I have office 2003 Professional, and I work in Access's Visual Basic
Sometimes after opening the "Microsoft Visual Basic Help" window by
standing on a function in the code and pressing F1, the help window
refuses to close - I click the X but it does nothing, and I'm forced
to go to the task manager and terminate the process msohelp.exe.
Does anyone have any idea how to fix this problem?
Thanks in advance,
...Problems with MS Visual Basic 6.0
This is a multi-part message in MIME format.
I need to intreact from VB6 with an PG 7.4.3 database, I've psqlodbc-7_03_0=
I use the Microsoft ADO Data Control 6.0, and I've installed the SP5 for VB=
When I use the adodc control I see the data but I've problems with :
- Update, on existing records : do nothing, I've to MoveFirst to store in d=
atabase ! Why ?
- Edit Method don't exist for ...GW BASIC to Visual Basic
I had done programnming in GW BASIC and Assembly 10 years back, when I
was in school. Later, I learnt C,C++, Core Java and COBOL. Will my
knowledge of BASIC hold me in good stead while learning Visual Basic?
Is there a resemblance between the two?
On 2 Mar 2005 21:11:59 -0800, "cat_dog_ass"
>I had done programnming in GW BASIC and Assembly 10 years back, when I
>was in school. Later, I learnt C,C++, Core Java and COBOL. Will my
>knowledge of BASIC hold me in good stead while learning Visual Basic?
>Is there a resemblance between the two?
A resemblance? Well, sure, they both look like Microsoft BASIC. Will
knowing the one help with the other? Actually, the differences between
GWB and VB are so big that you'll be learning a totally new language
that reminds you of one you already know. If you learn VB.Net you might
find that it also reminds you of C++ and/or Java.
auric underscore underscore at hotmail dot com
If at first you don't succeed, skydiving is not for you.
"cat_dog_ass" <email@example.com> wrote in message
> I had done programnming in GW BASIC and Assembly 10 years
> back, when I was in school . . . will my knowledge of BASIC hold
> me in good stead while learning Visual Basic?
If you're talking about VB6 then then answer is Yes. Much of the syntax of
the language is almost iden...Visual Basic ASP Minor Math Problem :)
I have a tiny problem with the below auction script.
Here's the jist of it:
This is an auction for unrestricted hockey players.
Owners of the current auction player can match the current bid, everyone
else must exceed the current bid by at least 10% to bid on him.
All owners may start the bidding off at the start bid though.
So, as an example, with Domi and the leafs;
Domi is starting at 300K
Rangers(leafs too!) may start the bid at 300k Leafs can match at 300k
Rangers may up the bid to 330K Leafs can match at 330K
Rangers can up the bid to 363K. Leafs can match at 363K
Rangers can up the bid to 399K
This works for the most part, but **occasionally**, you have to increase
your bid by 10% + one cent/dollar.
So, here is some examples of current bids and attempted bids.
300,000 => 330,000 Works and bid is made
330,000 => 363,000 Nope. Add a buck/penny and it works(ie, 363,000.01).
500,000 => 550,000 Works and bid is made
900,000 => 990,000 Nope. Add a buck/penny and it works.
So, my question, is does anyone know why i have to sometimes add a cent to
this? I'm tempted to think it has to do with ibidplaced being a different
datatype then ibidplaced but who knows.
Here are the important bits of the code
'* Get Bid From Form
iBidPlaced = FVal(Request.Form("Bid"))
'* get the most current bid from the database
If FVal(bidRS.Fields("aucCurrentBid")) > 0 Then
'* bidders must exc...Visual Basic: Reading Text File Problem
I'm in need of some ideas or help.
Here's what's up.
I've got a text file with three columns (separated by commas) with
ColumnA ColumnB ColumnC
553456 1 7
123456 1 7
123456 1 5
123456 1 2
857456 1 1
I can read this in fine, but what I want to achieve is output this to
another text file (instantaneously if possible) like:
ColumnA ColumnB ColumnC
553456 1 7
123456 3 14
857456 1 1
so where column A has the same number as the previous or the next line
then they need to be grouped and totaled up. I would rather have it so
it reads in the file and outputs the file rather than entering the
info into an array etc.
"Syed" <firstname.lastname@example.org> wrote in message <news:email@example.com>...
> I've got a text file with three columns (separated by commas) with
> ColumnA ColumnB ColumnC
> 553456 1 7
> 123456 1 7
> 123456 1 5
> 123456 1 2
> 857456 1 1
> I can read this in fine, but what I want to achieve is output this to
> another text file (instantaneously if possible) like:
> ColumnA ColumnB ColumnC
> 553456 1 7
> 123456 3 14
> 857456 1 1
> so where column A has the same numb...wscript.arguments problem in visual basic 6
I want to make an .exe file that takes arguments. If I create a .vbs
file as below, it's ok.
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
But when I try the same work in visual basic it doesn't work. I take
the error message of "Run-time error 429, ActiveX component can't
create object" to the code Set arg =
How can I accomplish this work with visual basic 6. I want to run the
..exe file from the command prompt with arguments.
There's no connection between VB and WScript.
(Also, WScript.Arguments is not an object, it's
What you want is Command.
In Sub Main or Form Load, depending upon
which starts your program, put:
s = Command$
s will then be your command line.
For return email remove XX and YY.
erman <firstname.lastname@example.org> wrote in message
> I want to make an .exe file that takes arguments. If I create a .vbs
> file as below, it's ok.
> Set objArgs = WScript.Arguments
> For I = 0 to objArgs.Count - 1
> WScript.Echo objArgs(I)
> But when I try the same work in visual basic it doesn't work. I take
> the error message of "Run-time error 429, ActiveX component can't
> create ob...Menu Editor problem, Visual Basic 6.0
I have a problem with the Menu Editor of Visual Basic 6.0..
First I'm not a expert with Visual Basic , thus maybe it is easy to solve..
When I want to make a menu with the Menu Editor, and I insert some items, I
get the following message:
* Menu control array element must have an index..
When I give it a number the the Sub menu items gives the following message�
* Menu control array elements must be contiguous and within the same
What do I wrong??
> Hi all,
> I have a problem with the Menu Editor of Visual Basic 6.0..
> First I'm not a expert with Visual Basic , thus maybe it is easy to
> When I want to make a menu with the Menu Editor, and I insert some
> get the following message:
> * Menu control array element must have an index..
You specified the same name for two or more menu entries but you didn't
fill in Index values; you can create a menu control array by using the
same name for multiple entries but when you do that you have to assign
a unique Index number to each of them.
> When I give it a number the the Sub menu items gives the following
> * Menu control array elements must be contiguous and within the
When you do create a control array they all have to be next to each
other at the same level.
...Problem Loading any Visual Basic 6 Created program.
Ive briefly googled and researched this to find no one having much
problems. I currently have a decent knowledge of wine itself playign
WoW, war3 etc on it. Having minor issues trying to load visual basic 6
applications some with and somewithout included ocx files in there
dir. Any Help or direction on this issue is appreciated.
Did you make sure the file msvbvm60.dll is installed? If not you may
need to copy it to ~/.wine/drive_c/windows/system32/.
On Dec 28, 1:16 am, Hac...@gmail.com wrote:
> Ive briefly googled and researched this to find no one having much
> problems. I c...Visual Basic 4 code import problem... #2
I hope that you can help me wit this one please and apologies if
i'm in the wrong forum! I recently bought a book that contaiend a
CD-ROM of very useful Visual Basic algoritms.
Now these algoritms are written in visual basic 4 I'm having
difficulty importing the projects into Visual Studio .NET. I get an
error message stating: "The Visual Basic 6.0 project file is corrupted
or cannot be read".
Can anyone tell me what I should do to make these work. Can you
recommend any good, free visual basic 4 editors that I can downlaod
and install. Should I be aware of anything else (I'm new to the VB
Thanks in advance for any suggestions/advice/recommendations etc...
...sequence number problem in visual basic 6.0
i am developing a billing software for a tollgate collection system. i
am using vb6.0 and ms access2000 as back end. the access has a table
called tblbill which contains flds like billno, billdttime (in
yyyyMMddhh.mm format ) vehicle number, valid dttime , transport code,
trips, amount and user.
the transport code is like 'BMS' means Bus[From][To] and follows like
'CMS' for car and 'LMS' for light vehicles. the bill number is like
'BMS10000000001' where BMS Is code and 1 is the gate 1 the rest is the
number sequence starting from 1. each code has its own starting number
i am also having a table called counter which is used to store the max
value for each code, and will be updated whenever a bill is generated.
from this table i used to create the billnumber. the problem here is
sometimes the counter gets updated but the bill number is not
generated so it creates a jump in the sequence i.e. i am having a bill
number 3 the next should be 4 but it is displayed as 5. this is not
happening often, it happens once or twice a day. as it deals with cash
the jumping numbers cause a lot hell of confusion in the accounts. so
i request your expertise to solve this problem asap.
sorry for such a large posting.
Thanks in advance
hello members long long ago i posted a message(given below) and i
found it to be not up to the standards of this group by assuming that...Visual Basic 6 on Windows 2003 database problem
I have some little programs, written in Visual Basic 6, that uses a
DB2 Database with an ODBC Driver.
The programs, have been working fine in a Windows NT machine, and I
have also probe them in a Windows 2000 Professional, but when run in a
Windows 2003 Server, they don=B4t work.
The error that appears is: 'CLI0115E The cursor state is incorrect.
The error occurs in the second MsgBox line, when ejecuting the
RecordCount method of the recorset.
Could it be a matter of incompatibility of Visual Basic 6 with
Set cnObj =3D New ADODB.Connection
cnObj.Open ("provider=3DIBMDADB2;dsn=3D" & strDNS & ";uid=3D" & strUser=
";pwd=3D" & strPass & "")
Set rsObj =3D New ADODB.Recordset
rsObj.CursorLocation =3D adUseClient
'rsObj.CursorLocation =3D adUseServer
strSQL =3D "SELECT DISTINCT CURRENT TIME AS HORA FROM " & strTabla &
rsObj.Open strSQL, cnObj, adOpenKeyset, adLockOptimistic, adCmdText
MsgBox "primer msg: " & rsObj.RecordCount
horaConsulta =3D Format(rsObj!HORA, "hh:mm")
strSQL =3D "SELECT * FROM " & strTabla & ".ERP00_DATCTRL_CAB WHERE
SITAOPER=3D'01' " & _
"AND FEPETOPE>=3D'" & strFecha & "' ORDER BY FEPETOPE,
HPETOPE"...Visual Basic 8 (express) newbie: compile problem
nice simple one; how do you compile a program so that other people can
use it in the same way as an exe. I know its a dotnet thing but am
dead new and don't know how to do this simple thing(?)
Almost everybody in this newsgroup is using VB6 or lower. While you may
get a stray answer to VB.NET questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.
For the microsoft news server, try these newsgroups...
There are some others, but these should get you started.
Rick - MVP
"John McGinty" <email@example.com> wrote in message
> nice simple one; how do you compile a program so that other people can
> use it in the same way as an exe. I know its a dotnet thing but am
> dead new and don't know how to do this simple thing(?)