Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 21
Default Protect Microsoft Query

I am inporting data using a query.
Is there a way of protecting that query so a user cannot
modify it?
It appears that anyone can go to Dataedit query and
change it.
Thanks - Don
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protect Microsoft Query

Have you had any luck with this?

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Protect Microsoft Query

Don

Protecting the sheet will protect the query. Tools - Protection - Protect
Sheet.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in message
...
I am inporting data using a query.
Is there a way of protecting that query so a user cannot
modify it?
It appears that anyone can go to Dataedit query and
change it.
Thanks - Don



  #4   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 21
Default Protect Microsoft Query

Thanks - However, I stil need them to be able to refresh
the data. Protecting the sheet disables that command.

Thanks - Don
-----Original Message-----
Don

Protecting the sheet will protect the query. Tools -

Protection - Protect
Sheet.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in

message
...
I am inporting data using a query.
Is there a way of protecting that query so a user

cannot
modify it?
It appears that anyone can go to Dataedit query and
change it.
Thanks - Don



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 21
Default Protect Microsoft Query

Not yet.
I don't care if the user manipulates the data, I just
don't want them to change the query.

-----Original Message-----
Have you had any luck with this??


---
Message posted from http://www.ExcelForum.com/

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Protect Microsoft Query

Don

Two options that I see. You can disable all the ways that the user can get
to edit query. Consider putting this in the sheet activate event and then
re-enable them in the sheet deactivate event

Dim cbcs As CommandBarControls
Dim cbc As CommandBarControl

Set cbcs = Application.CommandBars.FindControls(, 1950)

For Each cbc In cbcs
cbc.Enabled = False
Next cbc

Another option is to code your own Refresh button and protect the sheet.
The regular Refresh button, along with the Edit Query button, will be
disabled and the user will have to use your Refresh button.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in message
...
Thanks - However, I stil need them to be able to refresh
the data. Protecting the sheet disables that command.

Thanks - Don
-----Original Message-----
Don

Protecting the sheet will protect the query. Tools -

Protection - Protect
Sheet.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in

message
...
I am inporting data using a query.
Is there a way of protecting that query so a user

cannot
modify it?
It appears that anyone can go to Dataedit query and
change it.
Thanks - Don



.



  #7   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 21
Default Protect Microsoft Query

Thanks - I will try those

-----Original Message-----
Don

Two options that I see. You can disable all the ways

that the user can get
to edit query. Consider putting this in the sheet

activate event and then
re-enable them in the sheet deactivate event

Dim cbcs As CommandBarControls
Dim cbc As CommandBarControl

Set cbcs = Application.CommandBars.FindControls(, 1950)

For Each cbc In cbcs
cbc.Enabled = False
Next cbc

Another option is to code your own Refresh button and

protect the sheet.
The regular Refresh button, along with the Edit Query

button, will be
disabled and the user will have to use your Refresh

button.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in

message
...
Thanks - However, I stil need them to be able to

refresh
the data. Protecting the sheet disables that command.

Thanks - Don
-----Original Message-----
Don

Protecting the sheet will protect the query. Tools -

Protection - Protect
Sheet.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Don" wrote in

message
...
I am inporting data using a query.
Is there a way of protecting that query so a user

cannot
modify it?
It appears that anyone can go to Dataedit query and
change it.
Thanks - Don


.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query from microsoft query- Excel 2007 טבלאות אקסל 2007 Excel Discussion (Misc queries) 0 December 24th 07 10:47 PM
Microsoft Query and IIf steveh Excel Discussion (Misc queries) 2 January 25th 07 09:19 PM
Microsoft Query SB Excel Discussion (Misc queries) 4 July 26th 05 01:30 PM
Microsoft Query VNCNTJ Excel Worksheet Functions 1 June 28th 05 09:11 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"