Hi All,
i have few concern on VBa your help will be really appreciated .
1/
I have this code:
Dim myWB As Excel.Workbook
Private Sub CommandButton1_Click()
Set myWB = GetObject("N:\General Office\EMC\Misc\R&D - Ideas- Test concepts\Test\New LIS 2011v2 + Moving Checklist.xlsm")
Selection.GoTo What:=wdGoToBookmark, Name:="Landlord"
Selection.TypeText (myWB.Sheets("LEASE_INFORMATION").Range("Partnership:"))
Set myWB = Nothing
Set myWB = GetObject("N:\General Office\EMC\Misc\R&D - Ideas- Test concepts\Test\New LIS 2011v2 + Moving Checklist.xlsm")
Selection.GoTo What:=wdGoToBookmark, Name:="Tenant"
Selection.TypeText (myWB.Sheets("LEASE INFORMATION").Range("Company Name"))
Set myWB = Nothing
End Sub
that iam trying to run but i have the error message "Subscript out of range" and when i went back on the specific range (in Excel) it is "merger and center'" with other ranges. is it the ranges the issues?if yes how can i solve the problem please? if not what is the issue and how can i solve it?
2/ Let assume the same code above, is there a way how i can spread the "Tenant " and "Landlord " in all my document (WORD Doc. - approximately 10 pages) without repeating the code every time
Thank you Very much!!!
i have few concern on VBa your help will be really appreciated .
1/
I have this code:
Dim myWB As Excel.Workbook
Private Sub CommandButton1_Click()
Set myWB = GetObject("N:\General Office\EMC\Misc\R&D - Ideas- Test concepts\Test\New LIS 2011v2 + Moving Checklist.xlsm")
Selection.GoTo What:=wdGoToBookmark, Name:="Landlord"
Selection.TypeText (myWB.Sheets("LEASE_INFORMATION").Range("Partnership:"))
Set myWB = Nothing
Set myWB = GetObject("N:\General Office\EMC\Misc\R&D - Ideas- Test concepts\Test\New LIS 2011v2 + Moving Checklist.xlsm")
Selection.GoTo What:=wdGoToBookmark, Name:="Tenant"
Selection.TypeText (myWB.Sheets("LEASE INFORMATION").Range("Company Name"))
Set myWB = Nothing
End Sub
that iam trying to run but i have the error message "Subscript out of range" and when i went back on the specific range (in Excel) it is "merger and center'" with other ranges. is it the ranges the issues?if yes how can i solve the problem please? if not what is the issue and how can i solve it?
2/ Let assume the same code above, is there a way how i can spread the "Tenant " and "Landlord " in all my document (WORD Doc. - approximately 10 pages) without repeating the code every time
Thank you Very much!!!