close

have a workbook which contains 14 pages,
the first page contains employee info, and the other 13 pages read info from
the first page
the first page also reads info from the other 13 pages

if a row is deleted on page one is their a way to delete all the matching
rows on the other pages

thanks in advance

Select all sheets or just the ones you want. Then use the right arrow key
delete function on any of the sheets.

--
Don Guillett
SalesAid Software

quot;Richquot; gt; wrote in message
...
gt; have a workbook which contains 14 pages,
gt; the first page contains employee info, and the other 13 pages read info
gt; from
gt; the first page
gt; the first page also reads info from the other 13 pages
gt;
gt; if a row is deleted on page one is their a way to delete all the matching
gt; rows on the other pages
gt;
gt; thanks in advance
Don Guillett wrote:
gt; Select all sheets or just the ones you want. Then use the right arrow key
gt; delete function on any of the sheets.
gt;
This only works if the matching records are on the same row as the
record to be deleted.

Alan Beban

thanks

yes all the matching data is on the same row, , what i am looking for is a
way to delete the matching records, without the need to select all sheets,
because using that option if someone starts to reenter data when all the
sheets are selected it will also enter the data on all the other sheets.

i guess it will have to be some kink of makro, ? but rather than have a
macro on each line i guess i would need one that asks who to delete then
deletes him off eash page along with his matching data

thanks anyway
quot;Alan Bebanquot; wrote:

gt; Don Guillett wrote:
gt; gt; Select all sheets or just the ones you want. Then use the right arrow key
gt; gt; delete function on any of the sheets.
gt; gt;
gt; This only works if the matching records are on the same row as the
gt; record to be deleted.
gt;
gt; Alan Beban
gt;

give us more detailed info and we can help.

--
Don Guillett
SalesAid Software

quot;Richquot; gt; wrote in message
...
gt; thanks
gt;
gt; yes all the matching data is on the same row, , what i am looking for is a
gt; way to delete the matching records, without the need to select all sheets,
gt; because using that option if someone starts to reenter data when all the
gt; sheets are selected it will also enter the data on all the other sheets.
gt;
gt; i guess it will have to be some kink of makro, ? but rather than have a
gt; macro on each line i guess i would need one that asks who to delete then
gt; deletes him off eash page along with his matching data
gt;
gt; thanks anyway
gt; quot;Alan Bebanquot; wrote:
gt;
gt;gt; Don Guillett wrote:
gt;gt; gt; Select all sheets or just the ones you want. Then use the right arrow
gt;gt; gt; key
gt;gt; gt; delete function on any of the sheets.
gt;gt; gt;
gt;gt; This only works if the matching records are on the same row as the
gt;gt; record to be deleted.
gt;gt;
gt;gt; Alan Beban
gt;gt;
at the min i am using the following:-

Sub line9()
Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For This
Employee Continue?quot;, Buttons:=vbYesNo)
If Resp = vbNo Then Exit Sub
Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action Can
Not Be Undonequot;, Buttons:=vbYesNo)
If Resp = vbNo Then Exit Sub
Application.ScreenUpdating = False
Sheets(Array(quot;Janquot;, quot;Febquot;, quot;Marchquot;, quot;Aprilquot;, quot;Mayquot;, quot;Junequot;, quot;Julyquot;, quot;Augquot;,
quot;Sepquot;, quot;Octquot;, _
quot;Novquot;, quot;Decquot;)).Select
Range(quot;E9:AI9quot;).Select
Selection.ClearContents
Sheets(quot;Overviewquot;).Select
Range(quot;B9:E9quot;).Select
Selection.ClearContents
Range(quot;B9quot;).Select
Application.ScreenUpdating = True
End Sub

using this macro i would have to write it approx 130 times down the main
page next to each persons name. i was hoping to be able to do a quot;one hitquot;
button which when i click on it, it will ask me which row to delete rather
than having 130 macros saying the same thing

try this. Correct word wrap and add the other months. NO selections
necessary or desired so no screen updating.

Sub DeleteRequestedRowsInAllSheets()
Dim sh As Worksheet
x = InputBox(quot;Put in Row NUMBER to Deletequot;)

Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For This
Employee Continue?quot;, Buttons:=vbYesNo)
If Resp = vbNo Then Exit Sub
Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action Can
Not Be Undonequot;, Buttons:=vbYesNo)
If Resp = vbNo Then Exit Sub

For Each sh In Worksheets(Array(quot;Janquot;, quot;Febquot;, quot;Overviewquot;))
sh.Rows(x).Delete
Next sh

End Sub--
Don Guillett
SalesAid Software

quot;Richquot; gt; wrote in message
...
gt; at the min i am using the following:-
gt;
gt; Sub line9()
gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt; This
gt; Employee Continue?quot;, Buttons:=vbYesNo)
gt; If Resp = vbNo Then Exit Sub
gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action Can
gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt; If Resp = vbNo Then Exit Sub
gt; Application.ScreenUpdating = False
gt; Sheets(Array(quot;Janquot;, quot;Febquot;, quot;Marchquot;, quot;Aprilquot;, quot;Mayquot;, quot;Junequot;, quot;Julyquot;, quot;Augquot;,
gt; quot;Sepquot;, quot;Octquot;, _
gt; quot;Novquot;, quot;Decquot;)).Select
gt; Range(quot;E9:AI9quot;).Select
gt; Selection.ClearContents
gt; Sheets(quot;Overviewquot;).Select
gt; Range(quot;B9:E9quot;).Select
gt; Selection.ClearContents
gt; Range(quot;B9quot;).Select
gt; Application.ScreenUpdating = True
gt; End Sub
gt;
gt; using this macro i would have to write it approx 130 times down the main
gt; page next to each persons name. i was hoping to be able to do a quot;one hitquot;
gt; button which when i click on it, it will ask me which row to delete rather
gt; than having 130 macros saying the same thing
You could also do for ALL sheets except by

for each sh in worksheets
if sh.namelt;gt;quot;dontdeletethisonequot; then sh.rows(x).delete
next sh

--
Don Guillett
SalesAid Software

quot;Don Guillettquot; gt; wrote in message
...
gt; try this. Correct word wrap and add the other months. NO selections
gt; necessary or desired so no screen updating.
gt;
gt; Sub DeleteRequestedRowsInAllSheets()
gt; Dim sh As Worksheet
gt; x = InputBox(quot;Put in Row NUMBER to Deletequot;)
gt;
gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt; This Employee Continue?quot;, Buttons:=vbYesNo)
gt; If Resp = vbNo Then Exit Sub
gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action Can
gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt; If Resp = vbNo Then Exit Sub
gt;
gt; For Each sh In Worksheets(Array(quot;Janquot;, quot;Febquot;, quot;Overviewquot;))
gt; sh.Rows(x).Delete
gt; Next sh
gt;
gt; End Sub
gt;
gt;
gt; --
gt; Don Guillett
gt; SalesAid Software
gt;
gt; quot;Richquot; gt; wrote in message
gt; ...
gt;gt; at the min i am using the following:-
gt;gt;
gt;gt; Sub line9()
gt;gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt;gt; This
gt;gt; Employee Continue?quot;, Buttons:=vbYesNo)
gt;gt; If Resp = vbNo Then Exit Sub
gt;gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action
gt;gt; Can
gt;gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt;gt; If Resp = vbNo Then Exit Sub
gt;gt; Application.ScreenUpdating = False
gt;gt; Sheets(Array(quot;Janquot;, quot;Febquot;, quot;Marchquot;, quot;Aprilquot;, quot;Mayquot;, quot;Junequot;, quot;Julyquot;,
gt;gt; quot;Augquot;,
gt;gt; quot;Sepquot;, quot;Octquot;, _
gt;gt; quot;Novquot;, quot;Decquot;)).Select
gt;gt; Range(quot;E9:AI9quot;).Select
gt;gt; Selection.ClearContents
gt;gt; Sheets(quot;Overviewquot;).Select
gt;gt; Range(quot;B9:E9quot;).Select
gt;gt; Selection.ClearContents
gt;gt; Range(quot;B9quot;).Select
gt;gt; Application.ScreenUpdating = True
gt;gt; End Sub
gt;gt;
gt;gt; using this macro i would have to write it approx 130 times down the main
gt;gt; page next to each persons name. i was hoping to be able to do a quot;one hitquot;
gt;gt; button which when i click on it, it will ask me which row to delete
gt;gt; rather
gt;gt; than having 130 macros saying the same thing
gt;
gt;
thanks don, thats works better than i expected

quot;Don Guillettquot; wrote:

gt; You could also do for ALL sheets except by
gt;
gt; for each sh in worksheets
gt; if sh.namelt;gt;quot;dontdeletethisonequot; then sh.rows(x).delete
gt; next sh
gt;
gt; --
gt; Don Guillett
gt; SalesAid Software
gt;
gt; quot;Don Guillettquot; gt; wrote in message
gt; ...
gt; gt; try this. Correct word wrap and add the other months. NO selections
gt; gt; necessary or desired so no screen updating.
gt; gt;
gt; gt; Sub DeleteRequestedRowsInAllSheets()
gt; gt; Dim sh As Worksheet
gt; gt; x = InputBox(quot;Put in Row NUMBER to Deletequot;)
gt; gt;
gt; gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt; gt; This Employee Continue?quot;, Buttons:=vbYesNo)
gt; gt; If Resp = vbNo Then Exit Sub
gt; gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action Can
gt; gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt; gt; If Resp = vbNo Then Exit Sub
gt; gt;
gt; gt; For Each sh In Worksheets(Array(quot;Janquot;, quot;Febquot;, quot;Overviewquot;))
gt; gt; sh.Rows(x).Delete
gt; gt; Next sh
gt; gt;
gt; gt; End Sub
gt; gt;
gt; gt;
gt; gt; --
gt; gt; Don Guillett
gt; gt; SalesAid Software
gt; gt;
gt; gt; quot;Richquot; gt; wrote in message
gt; gt; ...
gt; gt;gt; at the min i am using the following:-
gt; gt;gt;
gt; gt;gt; Sub line9()
gt; gt;gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt; gt;gt; This
gt; gt;gt; Employee Continue?quot;, Buttons:=vbYesNo)
gt; gt;gt; If Resp = vbNo Then Exit Sub
gt; gt;gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action
gt; gt;gt; Can
gt; gt;gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt; gt;gt; If Resp = vbNo Then Exit Sub
gt; gt;gt; Application.ScreenUpdating = False
gt; gt;gt; Sheets(Array(quot;Janquot;, quot;Febquot;, quot;Marchquot;, quot;Aprilquot;, quot;Mayquot;, quot;Junequot;, quot;Julyquot;,
gt; gt;gt; quot;Augquot;,
gt; gt;gt; quot;Sepquot;, quot;Octquot;, _
gt; gt;gt; quot;Novquot;, quot;Decquot;)).Select
gt; gt;gt; Range(quot;E9:AI9quot;).Select
gt; gt;gt; Selection.ClearContents
gt; gt;gt; Sheets(quot;Overviewquot;).Select
gt; gt;gt; Range(quot;B9:E9quot;).Select
gt; gt;gt; Selection.ClearContents
gt; gt;gt; Range(quot;B9quot;).Select
gt; gt;gt; Application.ScreenUpdating = True
gt; gt;gt; End Sub
gt; gt;gt;
gt; gt;gt; using this macro i would have to write it approx 130 times down the main
gt; gt;gt; page next to each persons name. i was hoping to be able to do a quot;one hitquot;
gt; gt;gt; button which when i click on it, it will ask me which row to delete
gt; gt;gt; rather
gt; gt;gt; than having 130 macros saying the same thing
gt; gt;
gt; gt;
gt;
gt;
gt;

glad it helped--
Don Guillett
SalesAid Software

quot;Richquot; gt; wrote in message
...
gt; thanks don, thats works better than i expected
gt;
gt; quot;Don Guillettquot; wrote:
gt;
gt;gt; You could also do for ALL sheets except by
gt;gt;
gt;gt; for each sh in worksheets
gt;gt; if sh.namelt;gt;quot;dontdeletethisonequot; then sh.rows(x).delete
gt;gt; next sh
gt;gt;
gt;gt; --
gt;gt; Don Guillett
gt;gt; SalesAid Software
gt;gt;
gt;gt; quot;Don Guillettquot; gt; wrote in message
gt;gt; ...
gt;gt; gt; try this. Correct word wrap and add the other months. NO selections
gt;gt; gt; necessary or desired so no screen updating.
gt;gt; gt;
gt;gt; gt; Sub DeleteRequestedRowsInAllSheets()
gt;gt; gt; Dim sh As Worksheet
gt;gt; gt; x = InputBox(quot;Put in Row NUMBER to Deletequot;)
gt;gt; gt;
gt;gt; gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt;gt; gt; This Employee Continue?quot;, Buttons:=vbYesNo)
gt;gt; gt; If Resp = vbNo Then Exit Sub
gt;gt; gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action
gt;gt; gt; Can
gt;gt; gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt;gt; gt; If Resp = vbNo Then Exit Sub
gt;gt; gt;
gt;gt; gt; For Each sh In Worksheets(Array(quot;Janquot;, quot;Febquot;, quot;Overviewquot;))
gt;gt; gt; sh.Rows(x).Delete
gt;gt; gt; Next sh
gt;gt; gt;
gt;gt; gt; End Sub
gt;gt; gt;
gt;gt; gt;
gt;gt; gt; --
gt;gt; gt; Don Guillett
gt;gt; gt; SalesAid Software
gt;gt; gt;
gt;gt; gt; quot;Richquot; gt; wrote in message
gt;gt; gt; ...
gt;gt; gt;gt; at the min i am using the following:-
gt;gt; gt;gt;
gt;gt; gt;gt; Sub line9()
gt;gt; gt;gt; Resp = MsgBox(Prompt:=quot;This Action Will Reset All Pre Entered Data For
gt;gt; gt;gt; This
gt;gt; gt;gt; Employee Continue?quot;, Buttons:=vbYesNo)
gt;gt; gt;gt; If Resp = vbNo Then Exit Sub
gt;gt; gt;gt; Resp = MsgBox(Prompt:=quot;Are You Sure You Want To Continue - This Action
gt;gt; gt;gt; Can
gt;gt; gt;gt; Not Be Undonequot;, Buttons:=vbYesNo)
gt;gt; gt;gt; If Resp = vbNo Then Exit Sub
gt;gt; gt;gt; Application.ScreenUpdating = False
gt;gt; gt;gt; Sheets(Array(quot;Janquot;, quot;Febquot;, quot;Marchquot;, quot;Aprilquot;, quot;Mayquot;, quot;Junequot;, quot;Julyquot;,
gt;gt; gt;gt; quot;Augquot;,
gt;gt; gt;gt; quot;Sepquot;, quot;Octquot;, _
gt;gt; gt;gt; quot;Novquot;, quot;Decquot;)).Select
gt;gt; gt;gt; Range(quot;E9:AI9quot;).Select
gt;gt; gt;gt; Selection.ClearContents
gt;gt; gt;gt; Sheets(quot;Overviewquot;).Select
gt;gt; gt;gt; Range(quot;B9:E9quot;).Select
gt;gt; gt;gt; Selection.ClearContents
gt;gt; gt;gt; Range(quot;B9quot;).Select
gt;gt; gt;gt; Application.ScreenUpdating = True
gt;gt; gt;gt; End Sub
gt;gt; gt;gt;
gt;gt; gt;gt; using this macro i would have to write it approx 130 times down the
gt;gt; gt;gt; main
gt;gt; gt;gt; page next to each persons name. i was hoping to be able to do a quot;one
gt;gt; gt;gt; hitquot;
gt;gt; gt;gt; button which when i click on it, it will ask me which row to delete
gt;gt; gt;gt; rather
gt;gt; gt;gt; than having 130 macros saying the same thing
gt;gt; gt;
gt;gt; gt;
gt;gt;
gt;gt;
gt;gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()