The only catch here is that the file has to actually exist.
Function GetLocalFileName(byval strFilename as string) _
as string
dim fso as Scripting.FileSystemObject
dim f as Scripting.File
set fso = new Scripting.FileSystemObject
if fso.FileExists(strFilename) then
set f =...
Check out http://www.vbaccelerator.com/codelib/zip/zip.htm
It has a VB library that's pretty easy to program so you can do your own zip and unzip. Comes complete with samples.
scarfhead
Microsoft Common Controls 6 (mscomctl.ocx) has a status bar control in it. You can set up text boxes or progress bars or other controls in its panes.
Simplest way, though is just add a text box at the bottom of your form. Then write a simple procedure that you can call from your other...
The zip libraries that WinZip is based on are freeware. You can download vb compatible libraries for use in your projects from vbaccelerator.com
http://www.vbaccelerator.com/codelib/zip/zip.htm
scarfhead
Have you looked at Microsoft Data Bound List Controls 6.0
(dblist32.ocx)?
I haven't fleshed it out, but just playing around I can see that you use a data combo box for the main address bar that has a backend database with paths. Have a change event in the combo that runs a query with the...
I don't fully follow where the data is coming from. Is it already in the array and you want to output it to paper or screen?
You can create an object with 4 string variables,
one for each line and read the data out of the array.
Write an output function like this:
if Line4 = "" then...
TableDefs are DAO objects. To create new tables with ADO, you need to use ADOX. It should be in your references under "Microsoft ADO Ext. 2.6 for DDL and Security"
In Chapter 14 of Sam's "Teach Yourself ADO 2.5 in 21 Days" (the only reference I could find that covered ADOX)...
I have a form with a button that shows a .pdf report if it exists at the top of the form, in the declarations I have this code:
Private Declare Function ShellExecute Lib "Shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As...
Create a cryptic and obscure registry entry with your installation.
In your main function check if the registry entry has some particular value. If not, end.
Or store a date in that registry entry and check it to see if 50 days have expired.
sub main()
SecretCode = GetSetting(ThisApp...
...If NumMins < 15 Then
Duration = 15 - NumMins
Else
Duration = 75 - NumMins
End If
Duration = 1000 * Duration
CheckTime = Duration
End Function
Here's the sleep bit:
Declare Sub Sleep Lib "kernel32" _
(byval dwMilliseconds as Long)
And shell...
A quick web search turned up this site:
http://www.vbinformation.com/winplace.htm
The author used Visual 3Space from this vendor
http://www.tgs.com/
scarfhead
I've seen this question multiple times with no answer. I've never used the hierarchical flexgrid. What is so special about it that makes this question so difficult?
Does it allow you to traverse across rows and keep heirarchy information intact?
How do you populate the grid to begin with?
Can't...
With textboxes, you have to bold all or none. The only way to bold just some words and not others is to use the rtf text boxes.
For regular textboxes:
Text1.FontBold = True
Text1.FontItalic = True
scarfhead
...hover the cursor over the code and see the current value of a variable.
Private Function DoIt(ByVal nInput as Long) as Boolean
nInput = nInput * nInput
if nInput > 0 then DoIt = True
end function
Insert a breakpoint at the second line of code and run it.
Code execution stops at the...
loki,
Make sure you have Microsoft Scripting Runtime selected in your References.
As for invalid directories, here's a code snippet that deals with that. I also wrote this recursively as an exercise, but I can't find the recursive version of it.
Private Function ValidateOutputDir(ByVal...
If you use Jet in your application, one of MDAC's nasty little secrets is that Jet is no longer included. Up to MDAC 2.5, you got Jet and all of the necessary MDAC files along with it. 2.6 and beyond leave out some of the basics. I would try deploying MDAC 2.5 and 2.7. See if that clears up the...
dunno why. I copied that code straight out of my app.
Maybe a limitation of your printer?
(ask a programmer, it's always a hardware problem.)
I tried it in a test app without errors.
I'm printing to an HP 4 LaserJet over a network.
It is set as my default printer, which is what mPrinter points...
I have used the form's PrintForm method. Unfortunately, if you've got a lot of controls on a form and you only want to print a few of them, you've got to make the other ones invisible or re-create the ones you want on another form to do this.
hope that helps
scarfhead
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.