Fill unprotected cell inbetween protected section using excel vba

aashrithh

New Member
Joined
Jun 21, 2014
Messages
3
I need to fill the field next to 'Enter your TIN'(Highlighted in image) and Enter Mon...

Following is the code I had written for entering the TIN...

' Fill out tin no. - not working
Dim tinNo
tinNo = InputBox("What is your TIN")
range("B1").Value = tinNo

When I use the above code to fill the value, it is giving me a run time error '1004'...The cell or chart you are trying to change is on a protected cell...I don't have the password to unprotect the excel

edit


Manually this filed can be filled so I believe I am doing something wrong in the code.

The file(VAT_SL_EXL_XML.xls) I am using is available @ https://drive.google.com/folderview?id=0Bw97zVRZuJdYXzhnd0dkN2pFZUE&usp=sharing

If image attached is not visible, I have uploaded the same for reference the URL above.

Any help you could provide is much appreciated.
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
aashrithh,

Welcome to MrExcel.

Judging by the image, cell B1 is covered by a TextBox ????

If so then cell B1 behind the TextBox is locked and you will need to code to populate the text box.
 
Upvote 0
aashrithh,

Welcome to MrExcel.

Judging by the image, cell B1 is covered by a TextBox ????

If so then cell B1 behind the TextBox is locked and you will need to code to populate the text box.

Dear Snakehips,

Thanks for the info.
I will try to populate the text box and update the tread with the results.
 
Upvote 0
Dear Snakehips,

Got it to work :biggrin::biggrin:...Thanks a lot again for nudging me in the right direction

Cheers,
Aashrith
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top