part of text in a cell to supply path for saving workbook.

WERNER SLABBERT

Board Regular
Joined
Mar 3, 2009
Messages
107
This is what i have

ActiveWorkbook.SaveAs Filename:="\\MINES\Mines\Anglo Coal Mines\Quotes\" & Range("F19").Value & "\" & Range("K22").Value & ".xls"
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""CutePDF Writer on CPW2:"",,TRUE,,FALSE)"
Application.ActivePrinter = "TOSHIBA eS282/283Series PCL6 on Ne02:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""TOSHIBA eS282/283Series PCL6 on Ne02:"",,TRUE,,FALSE)"

Ok firstly thanx to a couple of people who helped with the original code.

now in this code 'F19' would be something like " Goedehoop south colliery"( as the path to save it in.

'K22' would be an order or quote number to the effect of " U15415"

in the 'F19' path there are two folders. 1# "STARTERS" and 2# "ALTERNATOR"
Question :

is there a way that i can add into the first line of code a "function " or statement that will allow my macro to look in cell 'A40' for the letters "ALT" in a string of text that would enable my macro to save that workbook to the "ALTERNATORS" folder ...

the text in the cell looks similar to this " BOSCH 12V ALT 9T 110A ( ALT1101 ) "
Any help or suggestions are very welcome.
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,226,729
Messages
6,192,696
Members
453,747
Latest member
tylerhyatt04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top