hello frendz..
im working on a small application wher i need to copy the data from excel sheet and paste it to the text file.im trying to create a macro for tht.
the selected row should be in a specific format. like if ther r 3 colums then the text should be saved in text file with comma's like a,b,c.
uptil now, im able to save the file with the data which contains blank spaces. how can i remove those blank spaces and insert a comma ther i tried using the following code..but its not working..plz help me solve this prob??
Open "C:\temp.txt" For Input As #1
astring = Input$(LOF(1), 1)
Close #1
astring = Replace(astring, " ", ",")
MsgBox astring 'to check if values are correct
Open "C:\temp.txt" For Output As #1
Print #1, astring
Close #1
thnx in advance