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...
...As Date
Dim ldPasteEffectiveDate As Date
Dim mwbStaticReport As Workbook
Dim mwbInvoice As Workbook
Sub Selectfiletoprocess()
'*****************************************************************************************
'Name: GetUserInput
'Description:
'Arguments...
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
...As Date
Dim ldPasteEffectiveDate As Date
Dim mwbStaticReport As Workbook
Dim mwbInvoice As Workbook
Sub Selectfiletoprocess()
'*****************************************************************************************
'Name: GetUserInput
'Description:
'Arguments...
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...
...Double
Dim liTransactionCounter As Integer
Dim ldCopyEffectiveDate As Date
Dim ldPasteEffectiveDate As Date
Sub Selectfiletoprocess()
'*****************************************************************************************
'Name: GetUserInput
'Description...
...As Integer
Dim ldCopyEffectiveDate As Date
Dim ldPasteEffectiveDate As Date
Dim iCounter As Integer
Sub Selectfiletoprocess()
'*****************************************************************************************
'Name: GetUserInput
'Description:
'Arguments...
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.