Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Auto-pop up msg windows

Dear Expert,
I need to add a new column in the spreadsheet as days goes by. Add column in
one day and old data keeps moving to right...
That's, calendar date in column A and new data in Column B and old data
(from Column C) keeps moving from left to right for each working days on and
on.
Excel column can go up to max 255 (around, exact max columns I can't recall).
End column is IV ?? (Anyway, it doesn't matter).
If data hits column IR, I need to do a back-up to save the old data from
column A to column IR.
Can I set a Function (Alert) in Column IS (few columns ahead of IV and one
column later than IR) if data keeps moving to left till hitting the column IR
so that it can run a macro to pop up a msgbox to alert me to back up old data
please ?
If it is blank in IR, function (alert) in IS and thus macro would not be
triggered.
Thanks so much.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Auto-pop up msg windows

Put this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim w As WorksheetFunction
Dim I As Range
Set I = Range("IS:IS")
Set w = Application.WorksheetFunction
x = w.CountA(I)
If x 0 Then
MsgBox ("warning - data in column IS")
End If
End Sub

The warning will appear as soon as data has been pushed into column IS.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200849


"Elton Law" wrote:

Dear Expert,
I need to add a new column in the spreadsheet as days goes by. Add column in
one day and old data keeps moving to right...
That's, calendar date in column A and new data in Column B and old data
(from Column C) keeps moving from left to right for each working days on and
on.
Excel column can go up to max 255 (around, exact max columns I can't recall).
End column is IV ?? (Anyway, it doesn't matter).
If data hits column IR, I need to do a back-up to save the old data from
column A to column IR.
Can I set a Function (Alert) in Column IS (few columns ahead of IV and one
column later than IR) if data keeps moving to left till hitting the column IR
so that it can run a macro to pop up a msgbox to alert me to back up old data
please ?
If it is blank in IR, function (alert) in IS and thus macro would not be
triggered.
Thanks so much.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Auto-pop up msg windows

Hi Gary,
That really works ... this is not the first time for you to help. I can
recall it. Very much appreciated !!!!
Elton

"Gary''s Student" wrote:

Put this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim w As WorksheetFunction
Dim I As Range
Set I = Range("IS:IS")
Set w = Application.WorksheetFunction
x = w.CountA(I)
If x 0 Then
MsgBox ("warning - data in column IS")
End If
End Sub

The warning will appear as soon as data has been pushed into column IS.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200849


"Elton Law" wrote:

Dear Expert,
I need to add a new column in the spreadsheet as days goes by. Add column in
one day and old data keeps moving to right...
That's, calendar date in column A and new data in Column B and old data
(from Column C) keeps moving from left to right for each working days on and
on.
Excel column can go up to max 255 (around, exact max columns I can't recall).
End column is IV ?? (Anyway, it doesn't matter).
If data hits column IR, I need to do a back-up to save the old data from
column A to column IR.
Can I set a Function (Alert) in Column IS (few columns ahead of IV and one
column later than IR) if data keeps moving to left till hitting the column IR
so that it can run a macro to pop up a msgbox to alert me to back up old data
please ?
If it is blank in IR, function (alert) in IS and thus macro would not be
triggered.
Thanks so much.

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
cannot open exel from windows xp in windows vista and visa versa lildiana New Users to Excel 4 February 25th 09 07:26 PM
can not save spreadsheet from a windows service on windows server dragonemp Excel Programming 2 November 3rd 08 03:48 PM
can windows vista edit shared document from windows xp sasa Excel Worksheet Functions 1 January 9th 08 06:44 PM
Page breaks are different in Windows 2000 and Windows XP Bill Allen Excel Discussion (Misc queries) 1 November 23rd 05 04:42 PM
Use Windows Script to run Windows Explorer Search? Ian Elliott[_3_] Excel Programming 0 January 12th 04 05:03 PM


All times are GMT +1. The time now is 11:01 AM.

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"