Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change cell after macro
I have a value in sheet1 AM4 of 101 along with a macro assigned to a text
box. I would like the value in AM4 to change to 102 after macro is run. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change cell after macro
Make something like this the last line of your macro
Sheets("Sheet1").Range("AM4").Value = Sheets("Sheet1").Range("AM4").Value + 1 Mike "bgkgmg" wrote: I have a value in sheet1 AM4 of 101 along with a macro assigned to a text box. I would like the value in AM4 to change to 102 after macro is run. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change cell after macro
hello , mike , it hopefully work!
i have simillar issue with cell , but is a verion compatibily, when we migrating a previous Excel xls project call to the com objects for each task, in upgrade to office 2007, using Vsto by C#, we change out some the template's cs, code for comptible to office 2007 , in the scope of: sheet. column object, column's max size -- in sheet .Column range from (AA:ZZ) to (A:IV) cAll= (Excel.Range)this.Sheet.Columns[ "A:IV", Type.Missing ]; b/c office 2007 is change to IV. then the column cell is not creating in design time of the project runing , there is a exception throw : system.Runtime.InteropServices.COMException (0x80020005): Type mismatch. we not yet know how to .. have any one got that ? any suggetion? you help are highly appreciated. Chan "Mike H" wrote: Make something like this the last line of your macro Sheets("Sheet1").Range("AM4").Value = Sheets("Sheet1").Range("AM4").Value + 1 Mike "bgkgmg" wrote: I have a value in sheet1 AM4 of 101 along with a macro assigned to a text box. I would like the value in AM4 to change to 102 after macro is run. Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change cell after macro
"Mike H" wrote: Make something like this the last line of your macro Sheets("Sheet1").Range("AM4").Value = Sheets("Sheet1").Range("AM4").Value + 1 It worked but leads me to additional question. When I run macro it moves info from invoice 101 to a master sheet row invoice 101 along with locking cells and protecting sheet which is what I want. Without your formula when I enter 102 and run macro the IF Then statement moves info to 102. With your formula added sheet1 shows 102 but master sheet remains protected. I hope you understand and thanks Mike "bgkgmg" wrote: I have a value in sheet1 AM4 of 101 along with a macro assigned to a text box. I would like the value in AM4 to change to 102 after macro is run. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro that will change the font of a cell if i change a value | Excel Discussion (Misc queries) | |||
Event Macro - On Cell Activate - Change Cell Format | Excel Programming | |||
macro to look down cells and if negative in the right of the cell change to left of the cell | Excel Programming | |||
Cell value change to trigger macro (worksheet change event?) | Excel Programming | |||
Please help! Macro to change cell contents based on cell to the left | Excel Programming |