VBA Excel Write integer to file

Joined
Aug 11, 2011
Messages
2
Reaction score
0
14 Hours Ago Hi,

i am wondering if anyone can help.

i am pulling me hair out trying to figure this out.

Basicially i have a macro that reads a line of text from a text file, for example "Davidmorrison=000001" and then splits this text by the equal symbol and creates an array.

Now what i need this to do is to take the array numbered 1 which is "000001" and add 1 digit so it will become "000002" and write this new number to the current line it split from.

But when it becomes 2 digits for example "000010" it loses one of the zeros.

Can anyone help ?


 
Hi...Please help me with below query.....

Below code is not working in windows 7, but it is working fine in win XP....


Code:

Dim Inet1 As Inet

Set Inet1 = New Inet

With Inet1
.URL = HostName
.UserName = UserName
.Password = Password
.Execute , "PUT " & LocalFileName & " " & RemoteFileName

Do While .StillExecuting
DoEvents
Loop
UploadFile = (.ResponseCode = 0)
End With
Set Inet1 = Nothing
 
14 Hours Ago Hi,

i am wondering if anyone can help.

i am pulling me hair out trying to figure this out.

Basicially i have a macro that reads a line of text from a text file, for example "Davidmorrison=000001" and then splits this text by the equal symbol and creates an array.

Now what i need this to do is to take the array numbered 1 which is "000001" and add 1 digit so it will become "000002" and write this new number to the current line it split from.

But when it becomes 2 digits for example "000010" it loses one of the zeros.

Can anyone help ?


Just saw your query....Should you still need the solution...please do let me know...
 
Back
Top