Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Help combining macros

Thread Tools
 
Search this Thread
 
Old Aug 14, 2004 | 06:00 PM
  #1  
MoonCat's Avatar
MoonCat
Thread Starter
Scooby Regular
 
Joined: Jul 2002
Posts: 98
Likes: 0
Default Help combining macros

Help,
I am trying to combine some macros from the web,

First one to select a file, the next one to edit text within file (I have only pasted the first part here).

The problem is passing the chosen file name to the second macro, it is expecting a filename where I have added the ???????, How can I get the filename in there ??


Sub OpenOneFile2()
Dim fn As Variant
fn = Application.GetOpenFilename("log-files,*.log", _
1, "Select File To Open", , False)
If TypeName(fn) = "Boolean" Then Exit Sub

Debug.Print "Selected file: " & fn


ReplaceTextInFile ThisWorkbook.Path & _
"???????????", "read test status,", "read test status"

End Sub


Any ideas ??
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
some cook
Subaru
24
Dec 23, 2015 09:27 AM
domu
ScoobyNet General
7
Oct 3, 2015 03:46 AM
Littleted
Computer & Technology Related
2
Sep 14, 2015 08:20 PM
airhead
Non Scooby Related
3
Oct 8, 2001 08:02 AM
brooks
Non Scooby Related
2
Aug 8, 2001 10:54 AM




All times are GMT +1. The time now is 08:49 AM.