A textbox and a listbox can only have one color and one type of font in them. Use a RichTextBox, highlight the text to be changed and use its SelFontName, SelColor, SelUnderline, SelBold, SelItalic, etc. properties.
I know in a MSHFlexGrid you can change the colors and fonts. Here's an...
You don't have to code anything to print the report from the preview window, unless you're talking about clicking a printer button that you've created to send the report straight to the printer. If that's the case then make sure you change the Destination property of your crystal report control...
Instead of using the vbTab and spaces, the Printer object has it's own Tab feature that you can create your own columns with it. Using your code, try this:
Printer.Print .Text & Tab(7 - Len(.Text))
This will start every column at the same spot. You may to play with the size a little bit to...
I have a VB project I created and when the user clicks a button, I have the code going through and looking for screen errors, such as fields that should have values in them. Whenever there is an error, I use the Error function to force the code to go to the routine's error handler. The error...
Use the ADODB Reference (Microsoft ActiveX Data Objects X.X Library) in VB. Also, you must set up your ODBC connection on the client. Then try the following code:
Dim cn as ADODB.Connection
Dim rs as ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset...
I keep getting the following error when I'm adding a new record to a SQL Server database on the UpdateBatch function in VB for an ADODB.Recordset:
[DBMSSOCN]General network error. Check your network
documentation.
It doesn't do it every time. Any ideas?
I keep getting the following error when I'm adding a new record to a SQL Server database on the UpdateBatch function in VB for an ADODB.Recordset:
[DBMSSOCN]General network error. Check your network
documentation.
It doesn't do it every time. Any ideas?
To call a control of one form from another form you must use the form name and then the control name. For example, if the MDIForm has the focus set to it and you want to set a variable equal to the property value of a control on another form use the following format:
Variable =...
First add a reference to the Microsoft Word X.X Object Library. Then use the following code to create and write to a Word document:
Dim oApp As Word.Application
Dim oDocument As Word.Document
Dim stFileName As String
stFileName = "C:\Example Document.doc"
Set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.