Need help with Workbook names

  • Thread starter Thread starter Legacy 247310
  • Start date Start date
Status
Not open for further replies.
L

Legacy 247310

Guest
Hey,
In advance.... Thank you so much!!

I have two file types that have been opened in excel as 2 separate workbooks. file type 1 = .tss and file type 2 = .ptr
these file types are paired with identical file names, e.g 123.tss xls and 123.ptr xls, 456.tss xls and 456.ptr xls,789.tss xls and 789.ptr xls.

Rather than writing a macro for each pair. I am trying to write one that will use the file type before conversion .e.g .tss and .ptr without the numbers, and xls.

The reason for this is that there are several items in the ptr file that need to be formatted and placed in the tss file to be saved under as a txt file that contains the file name number (123.ptr + 123.tss = 123.txt)

is it possible to create a generic macro that will carry out the same commands over and over again from the ptr files to the tss files regardless of file name number (123)? If it is possible, may you please help me develop the macro?

:biggrin:Tulip
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Status
Not open for further replies.

Forum statistics

Threads
1,223,948
Messages
6,175,579
Members
452,652
Latest member
eduedu

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