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 14 August 2004, 06:00 PM
  #1  
MoonCat
Scooby Regular
Thread Starter
 
MoonCat's Avatar
 
Join Date: Jul 2002
Posts: 98
Likes: 0
Received 0 Likes on 0 Posts
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 ??
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
some cook
Subaru
24
23 December 2015 09:27 AM
domu
ScoobyNet General
7
03 October 2015 03:46 AM
Littleted
Computer & Technology Related
2
14 September 2015 08:20 PM
airhead
Non Scooby Related
3
08 October 2001 08:02 AM
brooks
Non Scooby Related
2
08 August 2001 10:54 AM



Quick Reply: Help combining macros



All times are GMT +1. The time now is 02:13 AM.