1. yes, u r rite.
2. macro is stored externally. They open the macro, Click run in the macro, select the file to process and the file is processed at destinatinon given. the template is saved at C:\. the template is read-write and i dont want them to enter the password. it should be called via...
Here is the code:
Let me know the code to unprotect the read-write of the template.
Thanks
ption Explicit
Const mc_strTEMPLATE_FILE_PATH As String = "C:\Template.xls"
Const Password As String = "Valuation"
Dim mwbMacro As Workbook
Dim mwbAddressesReport As Workbook
Dim mwbLoanActivityReport...
When I run the macro, I want to unprotect the workbook and worksheets automatically , and then protect them again via VBA when the macro has been completely run????
Let me know.
I tried, this does not work. And with parenthesis, does not work either. This is before last EndSub in the code...
I removed that. So, that its not confusing. But, it was this before the last EndSub at the bottom.
mwbStaticReport.Workbook.Protect Password
mwbStaticReport.Worksheets("Valuation").Protect Password
When I run the macro, I want to unprotect the workbook and worksheets automatically , and then protect them again via VBA when the macro has been completely run
Here is my code. The workbook and worksheet p/w is same.
Option Explicit
Const mc_strTEMPLATE_FILE_PATH As String = "C:\Template.xls"
Const Password As String = "Valuation"
Dim mwbMacro As Workbook
Dim mwbAddressesReport As Workbook
Dim mwbLoanActivityReport As Workbook
Dim...
I have not been able to figure out with recording. SO, i posted it here. It breaks down on Protect/Unprotect line of code.iF i run without the protect/unprotect, the code runs just fine.
When I run the macro, How do I unprotect the workbook and worksheets automatically , and then protect them again via VBA when the macro has been completely run?
Can anyone help ?
To Run the macro:
1. Save the Template on C:\ as Template1.xls
2. Click Run on TestMacro.xls
3. Select...
Here is the code. Will this help??
Option Explicit
Const mc_strTEMPLATE_FILE_PATH As String = "C:\Template.xls"
Const mc_strSAVE_FILE_PATH As String = "C:\"
Dim mwbMacro As Workbook
Dim mwbInvoice As Workbook
Dim mwbAddressesReport As Workbook
Dim mwbStaticReport As Workbook
Dim...
Here is my code. The code breaks at:
rngSource.Copy Destination:=rngDest
It generates a run time error. Can anyone help.
Option Explicit
Const mc_strTEMPLATE_FILE_PATH As String = "C:\Template.xls"
Const mc_strSAVE_FILE_PATH As String = "C:\"
Dim mwbMacro As Workbook
Dim mwbInvoice As...
I get a run time error 1004 (cannot change part of merged cells). I have posted the template, macro and source file. Save template on c:\template.xls. Click Run, select source file. Can anyone please help???
http://www.vbaexpress.com/forum/showthread.php?t=15956&page=3
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.