By 퍼센트 화요일에, 30 1월 2018
에 게시 됨 뛰어나다
답글 0
좋아 0
조회수 1.5K
투표 0
I am hoping someone can help me solve a puzzle here. I have a workbook with a number of tabs for which I have created macro to save each of these as it's own VBA file. When the files are saved the macro is designed to use the name of the tab combined with a predefined value and a date and time.

Here is my issue. I have only single tab that I wish to exclude, as it needs a different naming convention but I cannot figure out how to exclude it from the macro I have and then get the same macro to save that file with a different naming convention.

여기에 내가 가진 것이있다.

Public Sub SaveWorksheetsAsCsv222()
Dim xW를 워크시트로
Dim xDir을 문자열로
Dim folder As FileDialog
dt = Format(CStr(Now), "YYYYMMDDHHMM")
폴더 설정 = Application.FileDialog(msoFileDialogFolderPicker)
If folder.Show <> -1 그런 다음 Sub 종료
xDir = 폴더.SelectedItems(1)
Application.ActiveWorkbook.Worksheets의 각 xW에 대해
xWs.SaveAs xDir & "\" & "US_DGF_" & xWs.Name & "_CARe_" & dt, xlCSV, Local:=True
다음 보기
최종 하위

What I need is for a tab named USCS to be saved using the same criteria but instead of "CARe: it needs to be CARe2 - Just this tab only.

사람이 제발 도와 드릴까요?
전체 게시물보기