Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Greg .. that works well when posted into Worksheet code!
How can I modify the code to post into the Workbook code?? Pete -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I don't understand your question. I don't know
what you mean by "Workbook" as opposed to "Worksheet" code. I had intended that the code be pasted into the code module pertaining to the worksheet involved. I'm not clear if this is what you've done. For instance, if the worksheet is named "Sheet1" then it should be pasted to the code module listed in the Project Explorer window as Sheet(Sheet1) under Microsoft Excel Objects. If you've done this then the code should execute instantaneously when you enter a number in Column A. Note that I have not included error supression code. If you enter text or a number greater than 15 in Column A then an error message will occur. I assumed you would look after this. Regards, Greg -----Original Message----- Thanks Greg .. that works well when posted into Worksheet code! How can I modify the code to post into the Workbook code?? Peter --- Message posted from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To save copying the code into numerous other worksheets within the sam
workbook is it possible to do something like the following ? Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target A Range) If Not Intersect(Target, Columns("A")) Is Nothing Then Target.Offset(, 1).IndentLevel = Target.Value End If End Sub Regards Pete -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes. The code as you have written it works for me
(corrected for wordwrap of course) when pasted to the ThisWorkbook code module. Regards, Greg -----Original Message----- To save copying the code into numerous other worksheets within the same workbook is it possible to do something like the following ? Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Not Intersect(Target, Columns("A")) Is Nothing Then Target.Offset(, 1).IndentLevel = Target.Value End If End Sub Regards Peter --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|