View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Problem doing Query to Access with Excel sheet protected

Yes.

Activesheet.Unprotect Password:="ABCD"
' do the query
Activesheet.Protect Password:="ABCD"
--
Regards,
Tom Ogilvy

"Harry" wrote in message
.. .
Unprotect it as in doing it in the macro...adding it to the existing code?

Harry


On Thu, 24 Feb 2005 22:08:24 -0500, "Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy

"Harry" wrote in message
. ..
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