Dim MySystemObject As New FileSystemObject
Dim sFileFolder as String
sFileFolder = "c:\mydocs\test"
MySystemObject.DeleteFolder sFileFolder, True
The "True" will force the delete even if a file is read-only.
Here's an example....
public sub formSettings()
Dim Con As Control
Dim fntTitle As New StdFont
Dim fntSubTitle As New StdFont
On Error Resume Next
With fntTitle
.Name = "Trebuchet MS"
.Size = 16
.Bold = True
.Italic = True
End With
With...
Double check your project references and make sure you have OLE Automation(stdole2.tlb) and Microsoft Word 8.0 Object Library(msWord8.olb) checked off. If they already are, rebuild your project form a clean vbp. The addresses referenced in your .vbp for these two libraries may be different on...
Are you sure it's being read in as 5.26031847012395E+15? Perhaps it's being read in correctly and VB is incorrectly converting to a numeric when you're displaying the value in your MsgBox call?? Try changing your code to
MsgBox rsSample(CSTR(40)) and see what happens.
Use Excel Automation to create a spreadsheet with your data
A good reference for you would be:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q247412&
Here's a code example that moves an array into an Excel spreadsheet:
Dim oExcel As Object
Dim oBook As Object
Dim...
As I stated, if you do a find on MSINFO32.EXE in Google, it will show you this link: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q184075
This link describes how you can use the MSINFO32.EXE to get at h/w devices. I just gave you my system info code so you could modify it go after...
It seems as if there should be a cleaner solution, but without seeing all the code, you could always set a public boolean variable in the cmdClear_Click() that says don't execute scrollbar_change() event.
For example in the cmdClear_Click:
blnScrollChange = False
In the ScrollBar_Change()...
MSINFO32.EXE may be able to list your hardware. If you look up more information on the MSINFO32.EXE(search on MSINFO32.EXE in Google) , it says hardware information is available using it. Here's an example of how I'm using the program to retrieve system settings(I thought maybe you could copy...
Another, probably more accurate way to do this, would be to instantiate whichever application you're wondering about. Do this using the following code:
Dim AppWord as Application
Set AppWord = GetObject(, "Word.Application")
Now you'd have the version of Word Available to you by...
There's probably many ways to check this, but I would do it looking for certain files on C:\Program Files\Microsoft Office. Excel8.olb is Excel version 8, Excel7.olb is Excel version 7. msword8.olb is Word version 8, MsWord7.Olb is Word version 7, etc.
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.