Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with a Clear Form Macro
Hey guys im having trouble figuring out how to make a clear form butto
in Macros for my excel spread sheet. It alread contained one the worke fine until i had to move the from around a bit. The macro looked like this originally: Sub clear123() ' ' clear123 Macro ' Macro recorded 12/31/02 by ' ' Range("D15:E19,G15:G19,G4:J4,G5:J5,G6:J6,G8:J8,G9: J9,K14:N20,R15:U28,K24:N28,D24:G28 _ ).Select Range("D24").Activate ActiveWindow.LargeScroll ToRight:=2 ActiveWindow.SmallScroll ToRight:=1 Range( _ "D15:E19,G15:G19,G4:J4,G5:J5,G6:J6,G8:J8,G9:J9,K14 :N20,R15:U28,K24:N28,D24:G28,AM8:AM12,AP8:AP12,AN2 4:BA24,AN26:BA26 _ ).Select Range("AN26").Activate Selection.ClearContents ActiveWindow.ScrollColumn = 1 Application.Run "SellingcoveragesheetA.xls!sfcsfitscreen" End Sub the problem is when i try to adjust ranges like D15:E19 to somethin less or more the macro dosent work at all. Im not sure how to save th changes i make or anyting that can help me at this point. Any advice would be appreciated. Eri -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with a Clear Form Macro
What does your changed code look like, and what error do you get?
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "DangerMouse114 " wrote in message ... Hey guys im having trouble figuring out how to make a clear form button in Macros for my excel spread sheet. It alread contained one the worked fine until i had to move the from around a bit. The macro looked like this originally: Sub clear123() ' ' clear123 Macro ' Macro recorded 12/31/02 by ' ' Range("D15:E19,G15:G19,G4:J4,G5:J5,G6:J6,G8:J8,G9: J9,K14:N20,R15:U28,K24:N28 ,D24:G28" _ ).Select Range("D24").Activate ActiveWindow.LargeScroll ToRight:=2 ActiveWindow.SmallScroll ToRight:=1 Range( _ "D15:E19,G15:G19,G4:J4,G5:J5,G6:J6,G8:J8,G9:J9,K14 :N20,R15:U28,K24:N28,D24:G 28,AM8:AM12,AP8:AP12,AN24:BA24,AN26:BA26" _ ).Select Range("AN26").Activate Selection.ClearContents ActiveWindow.ScrollColumn = 1 Application.Run "SellingcoveragesheetA.xls!sfcsfitscreen" End Sub the problem is when i try to adjust ranges like D15:E19 to something less or more the macro dosent work at all. Im not sure how to save the changes i make or anyting that can help me at this point. Any advice would be appreciated. Eric --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with a Clear Form Macro
Never mind. I figured it all out. LOL... just took me sometime. I have
a new question though that I am going to post under a new subject -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to clear all checkboxes on a form? | Excel Worksheet Functions | |||
CLear Data Entry Form Fields | Excel Discussion (Misc queries) | |||
Clear a Checkbox in a a user form | Excel Discussion (Misc queries) | |||
clear specific cells in a form | Excel Discussion (Misc queries) | |||
clear the Form | Excel Programming |