본문 바로가기
개발자 커뮤니티에 오신 것을 환영합니다!

vba [vba] WorkSheet가 속한 WorkBook의 파일경로

페이지 정보

profile_image
작성자 하나를하더라도최선을
댓글 0건 조회 33,893회 작성일 21-02-12 17:03

본문

특정 시트의 워크북 상위폴더
DimfPathAsString
fPath=StrReverse(objPath.Parent.Path)'// 해당 시트의 파일경로값을 좌우로 뒤집어 넣음
fPath=StrReverse(Right(fPath, Len(fPath)-InStr(fPath,"\\")))'// 상위 폴더

 
ThisWorkbook 의 상위폴더
DimfPathAsString
fPath=StrReverse(ThisWorkbook.Path)'// 파일경로값을 좌우로 뒤집어 넣음
fPath=StrReverse(Right(fPath, Len(fPath)-InStr(fPath,"\"))) '// 상위 폴더

댓글목록

등록된 댓글이 없습니다.


Copyright © program1472 | IT HUB. All rights reserved.