Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formatting for a Macro
I have a button that I press on one worksheet that will copy and
insert another worksheet. The only problem is that once I hit that button, the formatting does not follow. Is there a way that I can make the macro do this? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formatting for a Macro
Yes, the macro can be made to copy the formatting.
Post the macro, and what formatting you want copied (ie, range of cells). -- Regards, Fred "Maggie" wrote in message ups.com... I have a button that I press on one worksheet that will copy and insert another worksheet. The only problem is that once I hit that button, the formatting does not follow. Is there a way that I can make the macro do this? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formatting for a Macro
On Feb 26, 7:36 pm, "Fred Smith" wrote:
Yes, the macro can be made to copy the formatting. Post the macro, and what formatting you want copied (ie, range of cells). -- Regards, Fred "Maggie" wrote in message ups.com... I have a button that I press on one worksheet that will copy and insert another worksheet. The only problem is that once I hit that button, the formatting does not follow. Is there a way that I can make the macro do this?- Hide quoted text - - Show quoted text - Fred, Here is the macro: Sub WorksheetCopy() ' ' WorksheetCopy Macro ' Macro recorded 02/26/2007 by fhlbsyh ' ' Application.Run "'HOEPACalc-final(2).xls'!Sheet19.InsertSheets2" Sheets("HOEPA Worksheet").Select Application.Goto Reference:="Anti_Predatory_Lending_Worksheet" Selection.Copy Sheets("Loanxys").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("D17").Select End Sub I want the range to be A1:H71. That is my sheet. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formatting for a Macro
What does 'HOEPACalc-final(2).xls'!Sheet19.InsertSheets2 do? Is this the macro
which inserts the new sheet? On sheet Loanxys, where is the active cell? If you are doing an xlPasteAll, it should copy formats as well. However, you can simplify your code, and maybe solve your problem by replacing: Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False with: ActiveSheet.Paste -- Regards, Fred "Maggie" wrote in message oups.com... On Feb 26, 7:36 pm, "Fred Smith" wrote: Yes, the macro can be made to copy the formatting. Post the macro, and what formatting you want copied (ie, range of cells). -- Regards, Fred "Maggie" wrote in message ups.com... I have a button that I press on one worksheet that will copy and insert another worksheet. The only problem is that once I hit that button, the formatting does not follow. Is there a way that I can make the macro do this?- Hide quoted text - - Show quoted text - Fred, Here is the macro: Sub WorksheetCopy() ' ' WorksheetCopy Macro ' Macro recorded 02/26/2007 by fhlbsyh ' ' Application.Run "'HOEPACalc-final(2).xls'!Sheet19.InsertSheets2" Sheets("HOEPA Worksheet").Select Application.Goto Reference:="Anti_Predatory_Lending_Worksheet" Selection.Copy Sheets("Loanxys").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("D17").Select End Sub I want the range to be A1:H71. That is my sheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting via a macro | Excel Discussion (Misc queries) | |||
Conditional Formatting in a Macro | Excel Discussion (Misc queries) | |||
help macro for formatting pie chart | Charts and Charting in Excel | |||
Macro not formatting correctly | Excel Discussion (Misc queries) | |||
Macro/conditional formatting | Excel Discussion (Misc queries) |