Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I've got this macro:
Copy and paste values into text file Const OUTPUTFILENAME = "C:\Users\user\Documents\JobsTaxQualificationsBusi ness\CP+\CPPOffendersText.txt" Dim cell As Range, ro As Range, outP As String fnum = FreeFile Open OUTPUTFILENAME For Output As fnum For Each ro In Range("A1:J" & Cells.End(xlDown).Row).Rows outP = "" allBlank = True For Each cell In ro.Cells If cell.Column < 1 Then outP = outP & vbTab outP = outP & cell.Value If Len(Trim$(cell.Value)) Then allBlank = False Next If allBlank Then Exit For Print #fnum, outP Next Close fnum which, as it says, c & p values into a text file. I want to run it on a different PC where the filepath C:\Users\user\Documents\JobsTaxQualificationsBusin ess\CP+ doesn't exist. What's the best way of getting this to work on any PC? Change the filepath? Change the macro so that it will work anywhere? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to make macro work even a sheet is hidden. | Excel Programming | |||
Please help make this Archiving Macro work... | Excel Programming | |||
Can't make loop macro work - help? | Excel Programming | |||
how do I debug my Excel macro & make it actually WORK? | Excel Programming | |||
How do I make a macro work in one worksheet only | Excel Programming |