ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable from deleting rows; folders not to delete; sheets to inser (https://www.excelbanter.com/excel-programming/435141-disable-deleting-rows%3B-folders-not-delete%3B-sheets-inser.html)

CAPTGNVR[_2_]

disable from deleting rows; folders not to delete; sheets to inser
 
Dear All

Need guidance for the flg:

1. Sheets to be unprotected but must disable the option to delete any rows
and columns or cells. Is it possbile to enter a code in the worksheet??

2. Any idea to stop deleting the folders in windows bcos in the vb the
current workbook will be saved in a folder but some new ppl come and delete
the folder in windows and the program gives errors.

3. In the program the current sheet is deleted and inserts new data and
renames it to the old sheet name. Due to some wrongful entries the program
aborts after deleting the sheet. In that case when the program is run it
will error as the sheet is not present and hence want a line of vb to say if
the sheet 'report' is missing then Sheets.Add().Name = "report" so that the
program can continue.

Pls help

Brgds/captgnvr

joel[_31_]

disable from deleting rows; folders not to delete; sheets to inser
 

Found = False
For each Sht in sheets
if Sht.Name = "report" then
Found = True
exit for
end if
next Sht

If found = False then
Sheets.Add().Name = "report"
end if


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=145627


CAPTGNVR[_2_]

disable from deleting rows; folders not to delete; sheets to i
 
D/Joel

I was waiting for notification to my email id and never got any. I took the
chance to see if any answer then I found your response and hence sorry for
the delay in ack.

Just saw ur help. will read up the links and revert. Thanks for the tips
and will try the code also n wl rvrt.
brgds/captgnvr

"joel" wrote:


Found = False
For each Sht in sheets
if Sht.Name = "report" then
Found = True
exit for
end if
next Sht

If found = False then
Sheets.Add().Name = "report"
end if


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=145627

.



All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com