look for the fSO object Dim fso As New FileSystemObject, fil As File Set fil = fso.GetFile("c:\detlog.txt") ' Get a File object to query. Debug.Print "File last modified: "; fil.DateLastModified ' Print info
chris foote
Posts
-
Searching for files DateModified value -
Need some career AdviseI find myself in the same situation but maybe a bit further down the road. Like yourself I've been a LAN admin for about 5 years and have been encouraged to learn everything I can about SQL ,VB,HTML,Oracle,Perl,Javascript and C++. A year ago I started to lean everything I could about C++,VB and SQL and I'm now looking for jobs to make the switch to full time programmer. I've had a bit of background with programming (ANSI C) so these things have not been so hard to pick up. I would suggest that you take some of the MSDN courses. I've taken a few and they’ve helped me out allot. It also help's to have a small project that you can use to test your skill out before you dive deep into development. After about a year of programming I've come to the conclusion that, unless I were to do this full time, I will never have the level of knowledge needed to program comfortably. The MSDN cd’s have saved me quite a few times and you should plan on getting them if you’re going to be doing any windows programming. Chris Foote
-
difficult problem of importing?look up the Access command: docmd.tansfertext
-
path help needed !!add a comman Dialog active x control to your form. 1) add the component project-> components -> then place a check box next do comman dialog controls. 2) place the control on your form. 3)and then use code like below ComDialogfrmMain.CancelError = True ComDialogfrmMain.Flags = cdlOFNNoValidate ' Set filters ComDialogfrmMain.Filter = "All Files (*.*)|*.*|Text Files" & _ "(*.txt)|*.txt|Data Files (*.Dat)|*.Dat" ' Specify default filter ComDialogfrmMain.FilterIndex = 3 ' show dialog ComDialogfrmMain.ShowOpen xtFileName = ComDialogfrmMain.FileName
-
Updating MSAccess DBs between VersionsDon't know if this helps but thier is a undocumented access command switch /decomplie. It will upgrade or change the database to your version of visual basic. Needless to say use with extreme caution. MSACCESS.EXE /decompile c:\somename.mdb For a utily to handle different versions You might want to try MS Project.
-
Killer Apps List1. Novell Zenworks 2. Thier is nothing else.:eek:
-
Lucasfilm marketing department leakThat was the point of the film. They wanted to show how the young Vader’s choices were different from his son's. (He choose to leave his home and mother, Luke was forced into it when his parents were killed etc… )
-
DataControl ---> Data "object" HowTo???I'm not sure if this is what you are looking for.... You might what to do a search for "Data aware class" on the MSDN. Private Sub mysub(Data As Object) End Sub
-
import a text file sorting a list of valuesThanks for responding, I am not connecting to any SQL server. I am just opening a text file and populating a recordset My code is below. After I run this I am having trouble finding a way to just get a list of unique QueueName's from the recordset?? I create a recordset via this code.... Set rs = New Recordset rs.CursorLocation = adUseClient rs.Fields.Append "UserName", adBSTR, 128 rs.Fields.Append "DocName", adBSTR, 128 rs.Fields.Append "QueueName", adBSTR, 128 rs.Fields.Append "Date", adDBDate rs.Fields.Append "Time", adDBTimeStamp rs.Fields.Append "Workstation", adBSTR, 128 rs.Fields.Append "ClientCode", adBSTR, 128 rs.Fields.Append "Subcode", adBSTR, 128 rs.Fields.Append "PaperSize", adBSTR, 128 rs.Fields.Append "Features", adBSTR, 128 rs.Fields.Append "Sizeinbytes", adBSTR, 128 rs.Fields.Append "Pagecount", adBSTR, 128 rs.Fields.Append "cost", adBSTR, 128 rs.Fields.Append "AccountBalance", adBSTR, 128 rs.Open Then I import the txt file into the recordset using this code... Dim F As Long, sLine As String, A(0 To 13) As String F = FreeFile Open "C:\temp\text.txt" For Input As F Do While Not EOF(F) Line Input #F, sLine ParseToArray sLine, A() rs.AddNew rs.Fields(0) = A(0) rs.Fields(1) = A(1) rs.Fields(2) = A(2) rs.Fields(3) = CDate(A(3)) rs.Fields(4) = CDate(A(4)) rs.Fields(5) = A(5) rs.Fields(6) = A(6) rs.Fields(7) = A(7) rs.Fields(8) = A(8) rs.Fields(9) = A(9) rs.Fields(10) = A(10) rs.Fields(11) = A(11) rs.Fields(12) = A(12) rs.Fields(13) = A(13) rs.Update DoEvents Loop Close #F End Sub Sub ParseToArray(sLine As String, A() As String) Dim P As Long, LastPos As Long, i As Long P = InStr(sLine, ",") Do While P A(i) = Mid$(sLine, LastPos + 1, P - LastPos - 1) LastPos = P i = i + 1 P = InStr(LastPos + 1, sLine, ",", vbBinaryCompare) Loop A(i) = Mid$(sLine, LastPos + 1) End Sub
-
import a text file sorting a list of valuesI have a recodset that has been impoted from a csv text file. This is done via reading each line if the csv/text file into a sting procing the sting into an array and then add the values to the recordset. So I end up with a nice recordset. Now I seem unable to sort the recordset so that it contins a list of distint names. (EG I want a list of of the printers in the recordset). normanly this can be done via sql with the command "select distinctrow field list from tablename" however as i've populated the recordset from a text file i do not know what the tablename is? can anyone tell me how this is done or suggest another way? I'm programing this in vb6.0. thank you
-
Saving the last value of variableWhat your looking for the the propbag PropBag.WriteProperty PropBag.ReadProperty or you could put it in a recordset.. Dim rs As Recordset Set rs = New Recordset rs.CursorLocation = adUseClient rs.Fields.Append "Value", adsingle rs.open rs![value]=10 rs.save "c:\myvalue.dat" , adPersistADTG rs.close then to retrive the data Dim rs As Recordset Set rs = New Recordset rs.CursorLocation = adUseClient rs.open "c:\myvalue.dat" txtValue.text=rs![Value]
-
[ADO] leaking memory when opening/closing connection every minuteInstead of this: >Public gobjOraConnection As New ADODB.Connection >Public gobjOraCommand As New ADODB.Command Try this: Public gobjOraConnection As ADODB.Connection Public gobjOraCommand As ADODB.Command set gobjOraConnection = new ADODB.Connection set gobjOraCommand = new ADODB.Command Late binding is supposed to help conserve memory. The theory goes that Your program doesn’t have to check to see if you made an instance to your object every time you make a call to it. Throwing in a few set = nothings never hurts. set gobjOraCommand = nothing set gobjOraConnection = nothing Good luck!
-
Working DirectoryYou have to make a call to a windows API, see the code below. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Const SW_SHOWMAXIMIZED = 3 ShellExecute Form1.hwnd, "open", ProgramStart, programoption, ProgramPath, SW_SHOWMAXIMIZED
-
changing the value of a recordset's propertyTake a look at your CursorType if is forward only it might be the source of your problem.
-
Disconnect a PC from a Novell Network -
Copying filescheck out this article from ms. You can use any wildcard with this procedure. http://support.microsoft.com/support/kb/articles/Q151/7/99.asp
-
LinuxI've had alot of good results with slackware.