Problem doing Query to Access with Excel sheet protected

  • Thread starter Thread starter Harry
  • Start date Start date
H

Harry

Hello All

Subject sort of says it all. I have a macro that does an MSQUERY to an Access database, prompts for a company name,
pulls the record with the matching company name into the Excel sheet into the appropriate row. However, it is not
working with the sheet protected. The cells being written to are not locked or hidden. I'm not sure if it is the query
not getting done, or the writing of the data to the Excel sheet.

Thank you

Harry
 
Since your posting in programming,
in your code,
unprotect the sheet
do the query
protect the sheet.

--
Regards,
Tom Ogilvy

Harry said:
Hello All

Subject sort of says it all. I have a macro that does an MSQUERY to an
Access database, prompts for a company name,
pulls the record with the matching company name into the Excel sheet into
the appropriate row. However, it is not
working with the sheet protected. The cells being written to are not
locked or hidden. I'm not sure if it is the query
 
Yes.

Activesheet.Unprotect Password:="ABCD"
' do the query
Activesheet.Protect Password:="ABCD"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top