|
The following code uses the Scripting.FileSystemObject to rename the file specified in strFilePath to the format out mm-dd-yyyy.txt . Ex. for today, the file would be named
04-23-2001.txt
Hope this helps
Dim strFilePath As String
Dim strNewFileName As String
Dim fso As FileSystemObject
Dim file As File
strFilePath = "c:\myText.txt"
strNewFileName = Format(Now(), "mm-dd-yyyy") & ".txt"
Set fso = New FileSystemObject
Set file = fso.GetFile(strFilePath)
file.Name = strNewFileName
Set file = Nothing
Set fso = Nothing
Jason Gerard
MCSD, MCSE
Technology Point International, Inc.
|
|
|
|
|
I need that in VBScript.I think Vbscript doesn't support file.name
I am not sure about this.Please let me know.
|
|
|
|
|
Hi,
I need to write a function which takes special characters(ascii characters) eg: sm,Tm and convert them to HTML String.
I need to use VB to write this function.
Please help me with this.
|
|
|
|
|
I would use the split command to find the text that you are trying to replace. I'm sorry, but if I could see a few of your lines from the file I think that I could start the function for you.
I hope that you have found away to do this by now.
|
|
|
|
|
hloooooooooooooooo
do you understand anythings:eek
|
|
|
|
|
This may be a dumb question:
I have the variable Port of type integer declared in a module like this:
Dim Port as Integer
(in general declarations)
I then have it declared in each of my forms like this:
Dim Port as Integer
(in general declarations)
How do I pass the value of Port in my main form (frmMain) to another form called from frmMain?
David.
|
|
|
|
|
First of all, you have to change the declaration of Port from Private (Dim) to Public. Then you can just reference the variable using the form name. Ex:
form1.Port = frmMain.Port.
Hope this helps
Jason Gerard
MCSD, MCSE
Technology Point International, Inc.
|
|
|
|
|
You dont even have to declare it on each form. Just reference the one in frmMain as illustrated
by Jason.
Make it local to the function you are using it in
Private Sub cmdDoStuff_Click()
Dim iPort as Integer
iPort = frmMain.Port
' etc.
End Sub
|
|
|
|
|
Sir,
I want to know how to get full control over a scanner that is attached to system using VB API
|
|
|
|
|
I have a Variable Problem, that is being fill but I can't read it
I'm sending the variable to a DLL which is declared;
Private Declare Function GetList Lib "C:\Program Files\Microsoft Visual Studio\MyProjects\API\Debug\API.dll" _
(ByVal pszSch As String, ByVal pszQualifier As String, vNumber As Variant, ByVal pszMessage As String) As Long
The Function that calls this DLL is;
Private Sub Command1_Click()
Dim xStatus As Integer
Dim pszSch As String
Dim pszMessage As String
Dim pszQualifier As String
Dim vNumber As Variant
ReDim vNumber(2002) As String
pszSch = "TEST"
pszQualifier = " 'COM_NUM' = 123"
pszMessage = Space$(255)
xStatus = GetList(pszSch, pszQualifier, vNumber, pszMessage)
MsgBox vNumber(x), vbInformation, "vNumber"
Text1 = vNumber(x)
The MsgBox line with the vNumber will display the value in the variable
But the Text1 line shows nothing for the variable
What do I do to read this variable without the message box ?
thanks
|
|
|
|
|
I hope that this will work
Text1.Text = trim(cstr(vNumber(x)))
since the return variable is Variant type, before getting its value to the text box convert it into text type.
Raveendra Madupu
Member Technical Staff
Network Programs India Limited
raveendra@engineer.com
|
|
|
|
|
I would say that if vNumber should be a numerical value, explicitly cast it to what you need it to be. It is probably turning into a string. Set a breakpoint at the MsgBox line and set a watch on vNumber(x). That will probably help you determine how the data is kept and what you need to do with it.
Text1.Text = CInt( vNumber( x ) )
By the way, is x declared elsewhere?
|
|
|
|
|
can we run our exe when ever an outlook runs
|
|
|
|
|
Here is an easy way to do it: Write a VBA script in OutLooks script editor.
In the Application_Startup event, call Shell "OurExe.exe"
|
|
|
|
|
can we run our exe when ever an outlook runs
|
|
|
|
|
hey im Craig .. i am making a IRC bot for msn chat servers, would anyone help me find out were i can get sorce code to scan for bad lanague in a chatroom? i will be very thank ful if anyone can tell me!!
thanks
im new to this so go easy on me
Craig
|
|
|
|
|
Dear friends,
If anybody know how to build mail server using visual basic. I saw possibility using winsock, but i am confused while thinking about smtp server, po3 server and imap4 server in visual basic. If someone know this, please help me.
Bishnu pokharel
|
|
|
|
|
i dont know actually but u can use cdonts.dll for this.
we can send mail with this
|
|
|
|
|
I want to know that how can I add different numeric values seperateed by
commas from a textbox as child nodes in different existing child nodes?
usama
|
|
|
|
|
Use the split function to get the variant array of the values entered in the textbox.the child nodes can be added for the existing child node by using this array.
|
|
|
|
|
i have this project which requires me to give change and also in the form of dollars, quarters, dimes, nickels, and pennies?
|
|
|
|
|
I am a student at a cheap school and we are making a cheap game.
I have to make a game with Delphi 4.0 that is gonna whipe the
floor with the other students' games.
We worked on Frogger, I still haven't finished it yet.
*someone tell me how to make my frog die when he gets squished
by a truck.
Anyways I want to make a side-scrolling adventure game like
Mario from the NES but the problem is... I am an amateur
programmer and I need a team.
So this is my plan, I get help from friends and you guys
(friends , I make my images and you give me codes to make my
game work. I am no dum nut but if there would be a time-generous
person reading this and thought maybe he could help this guy
make a cheap game then he would profit in joy later on with
credit.
these questions have got to be answered soon. big favor needed.
Where do I start?
How do I make a side-scroller?
How do I make my HERO die and lose a life?
(I got most of that down)
How come my games are so choppy? I mean like it warps from point
A to point B and it ain't smooth.
I know FLASH 5 and I can animate stuff with it.
*Score one over the class
I am on MSN Messenger with gamepraiser@hotmail.com
and I really need a programmer friend here.
|
|
|
|
|
Hi,
I have developed a vbcomponent(Activex dll).the component has the function
like this SynonyList(Words, WordList, MeaningArray, cou)-Words,wordlist,meaningarry,cou are variant. if u pass a word in this fucntion it
returns wordlist,meaningarry as array of strings,cou as integer.if i use this
in vbscript it works .but javascript i don't know how to pass it to the function.
pls give me ur suggestions.
|
|
|
|
|
I think this process of component instantiation is works good
function fun1()
{
var objVar;
var x;
objVar = new ActiveXObject("ProgID");
x = objVar.YourMethod(required Aurguments);
}
Raveendra Madupu
Member Technical Staff
Network Programs India Limited
raveendra@engineer.com
|
|
|
|
|
i don't think that foryou
ghlooooooooooooooooooooooo
|
|
|
|