ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   paste to word (https://www.excelbanter.com/excel-programming/415228-paste-word.html)

pmss

paste to word
 
hello
i did following macros for copying cell from sheet and paste on word
application, i have used checkbox also. it works properly. But i could not
used more than one checkboxes. i mean if i checked two checkboxes or more ,
it should copy two sheets or more as specified and paste on word as separate
pages for separate sheets.
Private Sub CommandButton1_Click()
Dim Objword As Object
Set Objword = CreateObject("word.Application")
Objword.Visible = True
If CheckBox1 = True Then
Sheets("summary unit rate").Range("A1:F45").Copy
Objword.Documents.Add
Objword.Selection.PasteSpecial
Application.CutCopyMode = False
Set Objword = Nothing
Else: Objword.Visible = False
End If

End Sub

help me to do this.

pmss


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com