[solved]How to get data from Userform to txt file?
I have a Userform in my VBA app. I need the User to input a section,date,time,period, and interval(mins).these are from textboxes. How to get these input to be printed to a text file?The format is attached.pLs help.thanks.
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details
Thanks Alex..but i need a small logic there...If the user did not enter the date and time, then it should take the current system date and time(also in separate lines).Thankx
The keyword Date as above grabs the current date, whilst the keyword Time grabs the current system time.
You might also want to lookup the format() function in MSDN if you want to alter the format of the date & time values.
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details
Alex..need ur help again..I 've got a Shell func which passes 5 arguments(these 5 arguments should actually come from the txt file created above but I 've hardcoded it) How to pass it to my shell func in the module.This is my code.
:-
PHP Code:
Function StartDoc(DocName As String) As Long
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
Debug.Print "yoyo"
StartDoc = ShellExecute(Scr_hDC, "Open", DocName, "2 03/11/2002 08:15:00 7 30", "C:\windows\desktop\CreateAct\", SW_SHOWNORMAL)
Debug.Print "yaya"
End Function
The aruments are after the DocName param..Thanks again.
Last edited by alex_read; Apr 9th, 2003 at 07:39 AM.
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details
I dunno where the text file idea fits into all of this, but here's a sample project for you, it'll show a form with your textboxes, then pass the values over to your perl program - I've just tested it & the parameters are passed okay here
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details
Alex...I understand how u did it...But why i wanted to read in from the text file is bcoz, all my functions are not in the same Form module as u did.. The place where i click a button is in Form B(which activates a Shell function) but the fields which I'm getting the parameters from is Form A... Do u get it now..???
Like for this:
it is impossible to do so inmy case coz strParameters is defined in my Form B but the txtSection.Text..etc etc is in Form A.U got my problem now?I was so glad tat u really took the effort to try it out to help me. Thankx alot.
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details