![]() |
Writing a program to archive information
I need to write write a program that will cut a line of information and paste
it onto another page when prompted by the checking of a box. I have tried this by creating macros and adding them to format check boxes but when the computer is turned off something happens to them and the next day the are no longer connected to the check boxes. Why is it doing this? and is the a formula i can write by using visual basic? The command has to be prompted by the checking of a box. |
Writing a program to archive information
It can be done. Can you post the code you are currently using?
"Admin210" wrote: I need to write write a program that will cut a line of information and paste it onto another page when prompted by the checking of a box. I have tried this by creating macros and adding them to format check boxes but when the computer is turned off something happens to them and the next day the are no longer connected to the check boxes. Why is it doing this? and is the a formula i can write by using visual basic? The command has to be prompted by the checking of a box. |
Writing a program to archive information
i have added the codes for the macros i recorded but i am not really sure on
how to write a code in VB so i have nothing to show for that. Sub Macro1() ' ' Macro1 Macro ' ' Range("A7:I7").Select Selection.Copy Sheets("Completions").Select ActiveSheet.Paste End Sub Sub Macro4() ' ' Macro4 Macro ' ' Range("A7:H7").Select Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("New Business").Select ActiveCell.Offset(0, -4).Range("A1").Select Application.CutCopyMode = False Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Offset(0, 8).Range("A1").Select ActiveSheet.Paste End Sub "JNW" wrote: It can be done. Can you post the code you are currently using? "Admin210" wrote: I need to write write a program that will cut a line of information and paste it onto another page when prompted by the checking of a box. I have tried this by creating macros and adding them to format check boxes but when the computer is turned off something happens to them and the next day the are no longer connected to the check boxes. Why is it doing this? and is the a formula i can write by using visual basic? The command has to be prompted by the checking of a box. |
Writing a program to archive information
Do you have just one check box? If so, is the area that needs to be copied
always the same? If more than one check box does that box only control one range? When pasting do you need to keep previous data or are you writing over previous entries? Thanks "Admin210" wrote: i have added the codes for the macros i recorded but i am not really sure on how to write a code in VB so i have nothing to show for that. Sub Macro1() ' ' Macro1 Macro ' ' Range("A7:I7").Select Selection.Copy Sheets("Completions").Select ActiveSheet.Paste End Sub Sub Macro4() ' ' Macro4 Macro ' ' Range("A7:H7").Select Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("New Business").Select ActiveCell.Offset(0, -4).Range("A1").Select Application.CutCopyMode = False Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Offset(0, 8).Range("A1").Select ActiveSheet.Paste End Sub "JNW" wrote: It can be done. Can you post the code you are currently using? "Admin210" wrote: I need to write write a program that will cut a line of information and paste it onto another page when prompted by the checking of a box. I have tried this by creating macros and adding them to format check boxes but when the computer is turned off something happens to them and the next day the are no longer connected to the check boxes. Why is it doing this? and is the a formula i can write by using visual basic? The command has to be prompted by the checking of a box. |
Writing a program to archive information
there is one check box to each row and each check box only controlls that
row. when pasting the previous data needs to be kept and the new data entered on to the end of the list. "JNW" wrote: Do you have just one check box? If so, is the area that needs to be copied always the same? If more than one check box does that box only control one range? When pasting do you need to keep previous data or are you writing over previous entries? Thanks "Admin210" wrote: i have added the codes for the macros i recorded but i am not really sure on how to write a code in VB so i have nothing to show for that. Sub Macro1() ' ' Macro1 Macro ' ' Range("A7:I7").Select Selection.Copy Sheets("Completions").Select ActiveSheet.Paste End Sub Sub Macro4() ' ' Macro4 Macro ' ' Range("A7:H7").Select Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("New Business").Select ActiveCell.Offset(0, -4).Range("A1").Select Application.CutCopyMode = False Selection.Copy Sheets("Completions (Outstanding)").Select ActiveCell.Offset(0, 8).Range("A1").Select ActiveSheet.Paste End Sub "JNW" wrote: It can be done. Can you post the code you are currently using? "Admin210" wrote: I need to write write a program that will cut a line of information and paste it onto another page when prompted by the checking of a box. I have tried this by creating macros and adding them to format check boxes but when the computer is turned off something happens to them and the next day the are no longer connected to the check boxes. Why is it doing this? and is the a formula i can write by using visual basic? The command has to be prompted by the checking of a box. |
All times are GMT +1. The time now is 09:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com