👍 Refer the following Excel VBA code to open an existing excel workbook which is saved at a given path. To run the below code, do not forget to change the file path which I have provided.
मौजूदा एक्सेल कार्यपुस्तिका को खोलने के लिए निम्नलिखित एक्सेल VBA कोड का संदर्भ लें जो किसी दिए गए पथ पर सहेजा गया है।
नीचे दिए गए कोड को चलाने के लिए, मेरे द्वारा प्रदान की गई फ़ाइल पथ को बदलना न भूलें।
Sub openExcelWorkbook()
Dim wb As Workbook
Dim fPath As String
fPath = "D:\abc\myfile.xlsx"
Set wb = workbooks.Open(Filename:=fPath)
'given workbook is opened and it is referred by
' the variable wb of type workbook
' now you can do all the operations on wb which
' you want to do on this workbook
'For Example to close this workbook
wb.Close
End Sub
Comments
Post a Comment
Your advice or suggestions will be much appreciated and welcomed....