ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   pop up window (https://www.excelbanter.com/excel-worksheet-functions/206956-pop-up-window.html)

tleehh

pop up window
 
The code you were given only works great between "B1:B10"
I tried to add a line
Set insect=Intersect(Target, Range("C1:C10")) but it didnt work.
How can i have a pop up window if I have a larger cell area to work with.
Example,
B1:B10
C1:C10
D1:D10
E1:E10
thru
M1:M10 Thank you.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim insect As Range
Dim Y As String
Set insect = Intersect(Target, Range("B1:B10"))

If insect Is Nothing Then Exit Sub
Y = InputBox("What sheet do you want to put this in?")
Sheets(Y).Activate
End Sub



Mike H

pop up window
 
no need for a new post look at your other

"tleehh" wrote:

The code you were given only works great between "B1:B10"
I tried to add a line
Set insect=Intersect(Target, Range("C1:C10")) but it didnt work.
How can i have a pop up window if I have a larger cell area to work with.
Example,
B1:B10
C1:C10
D1:D10
E1:E10
thru
M1:M10 Thank you.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim insect As Range
Dim Y As String
Set insect = Intersect(Target, Range("B1:B10"))

If insect Is Nothing Then Exit Sub
Y = InputBox("What sheet do you want to put this in?")
Sheets(Y).Activate
End Sub




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

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