ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range does not work (https://www.excelbanter.com/excel-programming/372815-range-does-not-work.html)

sonu[_2_]

Range does not work
 
lst_clm = exApp.worksheets(wks.Name).Range("IV1").end(-4159).Column
exApp.worksheets(wks.Name).Rows("1:5").insert
exApp.worksheets(wks.Name).Range(cells(1, 1), cells(5,
lst_clm)).merge

I get error at the last line. it says sub or function not defined. I am
controling excel from MSAccess by creating exApp as excel application
object.


sonu[_2_]

Range does not work
 
Never mind i fixed it by using exApp again befroe cells.
lst_clm = exApp.worksheets(wks.Name).Range("IV1").end(-4159).Column
exApp.worksheets(wks.Name).Rows("1:5").insert
exApp.worksheets(wks.Name).Range(exApp.cells(1, 1),
exApp.cells(5, lst_clm)).merge

sonu wrote:
lst_clm = exApp.worksheets(wks.Name).Range("IV1").end(-4159).Column
exApp.worksheets(wks.Name).Rows("1:5").insert
exApp.worksheets(wks.Name).Range(cells(1, 1), cells(5,
lst_clm)).merge

I get error at the last line. it says sub or function not defined. I am
controling excel from MSAccess by creating exApp as excel application
object.




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

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