Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting via a macro mike_vr Excel Discussion (Misc queries) 3 November 8th 06 04:19 PM
Conditional Formatting in a Macro Ed Excel Discussion (Misc queries) 2 August 28th 06 11:23 PM
help macro for formatting pie chart monkeygirl Charts and Charting in Excel 0 March 2nd 06 10:47 AM
Macro not formatting correctly js8373 Excel Discussion (Misc queries) 0 February 28th 06 07:53 PM
Macro/conditional formatting BigMac Excel Discussion (Misc queries) 1 December 6th 04 11:24 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"