Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
I have a workbook that contains 3+ worksheets. Within 2 of those worksheets I have 2 columns each that are for dates. WHen I run my insert_date sub (which I have working) I only want a date to be inserted in those specific columns. The cell that they enter that date is the activecell. I hope this makes sense. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
Scotty, Post your code, and a description of where you want the date placed. HTH, Bernie MS Excel MVP "Scotty9349" wrote in message ... I have a workbook that contains 3+ worksheets. Within 2 of those worksheets I have 2 columns each that are for dates. WHen I run my insert_date sub (which I have working) I only want a date to be inserted in those specific columns. The cell that they enter that date is the activecell. I hope this makes sense. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
Your description is just a little bit too skimpy for us (well, at least me) to figure out what you have and what you want to do with it. For example, you say "they enter the date in the activecell", but earlier you say the name of your sub is "insert_date"... are you taking the date the user enters and putting it somewhere else (those 2 columns you mentioned maybe), or is something else going on? Can you provide us with more details? -- Rick (MVP - Excel) "Scotty9349" wrote in message ... I have a workbook that contains 3+ worksheets. Within 2 of those worksheets I have 2 columns each that are for dates. WHen I run my insert_date sub (which I have working) I only want a date to be inserted in those specific columns. The cell that they enter that date is the activecell. I hope this makes sense. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
On Wed, 1 Jul 2009 07:40:01 -0700, Scotty9349 wrote: I have a workbook that contains 3+ worksheets. Within 2 of those worksheets I have 2 columns each that are for dates. WHen I run my insert_date sub (which I have working) I only want a date to be inserted in those specific columns. The cell that they enter that date is the activecell. I hope this makes sense. If ActiveCell.Parent.Name < "Name of sheet that doesn't get dates" Then If ActiveCell.Column = 3 Then 'Column C 'do thing End If End If You can also use ActiveCell.Parent.Codename if you're worried about someone renaming the sheets. -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
Sorry for the confusion I caused. Let's see if I can explain better. I have a workbook with 3 worksheets; Estimates, Projects, Closed. Within the Projects and Closed worksheets columns A and B are for user entered dates. I wrote a small userform to enter the info automatically. However, in the event the user wanted to change the date later on I am working on a stand alone insert_date sub. Using the frmCalendar provided by MS Excel, I would like to pass the entered date to a cell the user selects. The only stipulation is that the user must select a cell in column A or B of the Projects or Closed worksheets. I can pass the date into any cell the user selects, I just want to limit them where dates can be entered. I tried the following: If ActiveSheet.Name = "Projects" Or ActiveSheet.Name = "Closed" Then If ActiveCell.Column = "A" Or ActiveCell.Column = "B" Then Insert_date End If Else MsgBox "Enter date in correct field" End If |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
If ActiveSheet.Name = "Projects" Or ActiveSheet.Name = "Closed" Then If ActiveCell.Column = 1 Or ActiveCell.Column = 2 Then Insert_date End If Else MsgBox "Enter date in correct field" End If HTH, Bernie MS Excel MVP "Scotty9349" wrote in message ... Sorry for the confusion I caused. Let's see if I can explain better. I have a workbook with 3 worksheets; Estimates, Projects, Closed. Within the Projects and Closed worksheets columns A and B are for user entered dates. I wrote a small userform to enter the info automatically. However, in the event the user wanted to change the date later on I am working on a stand alone insert_date sub. Using the frmCalendar provided by MS Excel, I would like to pass the entered date to a cell the user selects. The only stipulation is that the user must select a cell in column A or B of the Projects or Closed worksheets. I can pass the date into any cell the user selects, I just want to limit them where dates can be entered. I tried the following: If ActiveSheet.Name = "Projects" Or ActiveSheet.Name = "Closed" Then If ActiveCell.Column = "A" Or ActiveCell.Column = "B" Then Insert_date End If Else MsgBox "Enter date in correct field" End If |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine if activecell in specific worksheet and column
Thanks. Boy do I feel stupid for being so close. "Bernie Deitrick" wrote: If ActiveSheet.Name = "Projects" Or ActiveSheet.Name = "Closed" Then If ActiveCell.Column = 1 Or ActiveCell.Column = 2 Then Insert_date End If Else MsgBox "Enter date in correct field" End If HTH, Bernie MS Excel MVP "Scotty9349" wrote in message ... Sorry for the confusion I caused. Let's see if I can explain better. I have a workbook with 3 worksheets; Estimates, Projects, Closed. Within the Projects and Closed worksheets columns A and B are for user entered dates. I wrote a small userform to enter the info automatically. However, in the event the user wanted to change the date later on I am working on a stand alone insert_date sub. Using the frmCalendar provided by MS Excel, I would like to pass the entered date to a cell the user selects. The only stipulation is that the user must select a cell in column A or B of the Projects or Closed worksheets. I can pass the date into any cell the user selects, I just want to limit them where dates can be entered. I tried the following: If ActiveSheet.Name = "Projects" Or ActiveSheet.Name = "Closed" Then If ActiveCell.Column = "A" Or ActiveCell.Column = "B" Then Insert_date End If Else MsgBox "Enter date in correct field" End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine if filter set on specific column | Excel Programming | |||
determine activecell and move to it after running ohter sub... | Excel Programming | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
Assistance with macro to determine if a specific worksheet is pres | Excel Programming | |||
Trigger macro if an Activecell is within a specific Range | Excel Programming |