Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
That is working ! You are great.
Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
If you mean to insert the date/time to any cell without using the command
button use the worksheet selection change event as below. Right click the sheet tabview code and paste the code.. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Target = Now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: That is working ! You are great. Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
also working !
can i make that only to f.e. colom G and not all the sheet ? sorry for all this questions "Jacob Skaria" wrote: If you mean to insert the date/time to any cell without using the command button use the worksheet selection change event as below. Right click the sheet tabview code and paste the code.. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Target = Now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: That is working ! You are great. Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count = 1 Then Range("G" & Target.Row) = Now End If End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: also working ! can i make that only to f.e. colom G and not all the sheet ? sorry for all this questions "Jacob Skaria" wrote: If you mean to insert the date/time to any cell without using the command button use the worksheet selection change event as below. Right click the sheet tabview code and paste the code.. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Target = Now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: That is working ! You are great. Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
Hello,
working but i only want the time when clicking in a cell of column G when i click a cell in f.e. column Z now the time is alse getting up in column G "Jacob Skaria" wrote: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Range("G" & Target.Row) = Now End If End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: also working ! can i make that only to f.e. colom G and not all the sheet ? sorry for all this questions "Jacob Skaria" wrote: If you mean to insert the date/time to any cell without using the command button use the worksheet selection change event as below. Right click the sheet tabview code and paste the code.. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Target = Now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: That is working ! You are great. Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
to run a command in a cell
i want to insert the date/tie just in the cells from column G
all other colums are having other data So if i click G1 or G2 or G... date and time must uppear ( but only when i click those cells) "Jacob Skaria" wrote: If you mean to insert the date/time to any cell without using the command button use the worksheet selection change event as below. Right click the sheet tabview code and paste the code.. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then Target = Now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: That is working ! You are great. Any chance that i can introduce that in a single cell So i click A47 and that the date&time comes automatically "Jacob Skaria" wrote: Try Sub Macro1() Activecell = now End Sub If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hi again ;-) it does work but it changes the field A1 but i want it to a cell that i want. I click f.e. on A47 and click the button and then date&time appears in A47 "Steven Van Laethem" wrote: Did all but doesn't work. I use Excel 2007 is your solution also for this version ? The command to have the system date&time is =now() must it be the same your code ? "Jacob Skaria" wrote: Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Sub Macro1() Range("A1") = Now End Sub --From ToolbarsDrawingToolbarAutoShapesBasic Shapes select any shape you like. say ("Bevel") and place that in your worksheet. --Right click the shapeAssign Macro and select the macro to be assigned --Now try Button click If this post helps click Yes --------------- Jacob Skaria "Steven Van Laethem" wrote: Hello, I want to run a command -- =Now() in a cell. I want it configured as a button ( in a cell) so when i press that button/cell that automaticayly it takes the system date and tim. Who can help me ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
to run a command in a cell | Excel Discussion (Misc queries) | |||
how to run a command from a cell | Excel Worksheet Functions | |||
Pivot Table Error Message - "Command Text not set for command obje | Excel Discussion (Misc queries) | |||
Locate a cell, based on a criteria, then use the 'Cell' command... | Excel Discussion (Misc queries) | |||
in vba what command is used to determine if a particular cell on a particular sheet changed? some kind of event? how to get the old and new value of the cell? | Excel Worksheet Functions |