두 개의 Excel 파일이 있습니다. File_1 및 File_2. File_1에는 두 개의 시트가 있습니다. Sheet_A 및 Sheet_B. File_2의 데이터는 Sheet_A로 바뀝니다 (File_1에 있음).Excel VBA 원본 시트에 대한 링크가없는 시트 복사
Sheet_B의 단추를 Sheet_B의 Sheet_B에 복사하는 단추에 VBA 코드가 연결되어 있습니다. 코드는 정상적으로 작동하지만 File_1의 링크는 유지됩니다.
데이터를 복사하고 링크를 유지하지 않고 서식을 유지하고 싶습니다. 이것을 어떻게 할 수 있습니까?
Sheet_B에 Sheet_A에서 데이터를 복사 아래 내 코드의 일부 :
' Check the Record Sheet to ensure the data is not already there
Set CheckForDups = recordSht.Range(recordSht.Cells(1, 1), recordSht.Cells(1, lCol)).Find(What:=maxCustomerRng.Offset(-1, 0).Value, LookIn:=xlValues)
' If CheckForDups is Nothing then the date was not found on the record sheet. Therefore, copy the column
If CheckForDups Is Nothing Then maxCustomerRng.EntireColumn.Copy Before:=recordSht.Cells(1, lCol + 1)
제공된 텍스트와 코드 사이에 상황이 매우 불분명합니다. –
@ScottHoltzman 내 글을 수정했습니다. 희망은 지금 이해가 되네. – aab