Hi,
try this... ASSUME.. cell a1 and cell b1 are both blank. you must start the macro from the left most section of all the sheets in the workbook, and the worksheet is the name you want as your file.
p.s. if there is a better way to do this, please feel free to update the code and post it here.
Cheers,
Thomas
Sub Macro3()
Application.Goto Reference:="R1C1"
ActiveCell.FormulaR1C1 = "=CELL(""filename"")"
Application.Goto Reference:="R1C1"
Application.Goto Reference:="R1C2"
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])"
ActiveCell.FormulaR1C1 = "=FIND(""]"",RC[-1])"
ActiveCell.FormulaR1C1 = "=LEN(RC[-1]-FIND(""]"",RC[-1]))"
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])-FIND(""]"",RC[-1])"
ActiveCell.FormulaR1C1 = "=RIGHT(LEN(RC[-1])-FIND(""]"",RC[-1]),RC[-1])"
ActiveCell.FormulaR1C1 = "=RIGHT(RC[-1],LEN(RC[-1])-FIND(""]"",RC[-1]))"
ActiveCell.FormulaR1C1 = _
"=""C:\""&""""&RIGHT(RC[-1],LEN(RC[-1])-FIND(""]"",RC[-1]))&""""&"".txt"""
Calculate
Application.Goto Reference:="R1C1"
Selection.Copy
Application.Goto Reference:="R1C1"
ActiveCell.Range("A1:B1").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="R1C1"
'End Sub
'File save with macro, pick the file name from named cell on spreadsheet
'Sub filenamer()
Application.DisplayAlerts = False
kname = Range("b1").Formula
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=kname, FileFormat:=xlText, CreateBackup:=False
Application.DisplayAlerts = False
'End Sub
'1629.html
'Sub Macro5()
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
ActiveSheet.Next.Select
Application.Run "Macro3"
End Sub