Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the code below how can I make the range in the following line point to
the Worksheet named Sunday (cell B1000)? If Range("B1000").Value = "xxx" Then Private Sub Workbook_BeforeClose(Cancel As Boolean) If Range("B1000").Value = "xxx" Then Range("B1").Select ThisWorkbook.Close False Else: Range("B1").Select End If Range("B1").Select Application.EnableEvents = True End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Patrick,
You can refer to that worksheet using the below line: Thisworkbook.Worksheets("Sunday").Range("B1000").V alue Hope that helps. Regards, James "Patrick Simonds" wrote: In the code below how can I make the range in the following line point to the Worksheet named Sunday (cell B1000)? If Range("B1000").Value = "xxx" Then Private Sub Workbook_BeforeClose(Cancel As Boolean) If Range("B1000").Value = "xxx" Then Range("B1").Select ThisWorkbook.Close False Else: Range("B1").Select End If Range("B1").Select Application.EnableEvents = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
range question | Excel Programming | |||
Range question | Excel Programming | |||
Range question in VB | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |