![]() |
select merged cells
Hi ,
I'm trying to select merged cells ("B25:B28"). When I type in the following code, sheet1.range("B25").select, VB gives an error. I tried selecting the whole range as well, but no success. Hope someone knows how to do this. Thanks in advance Max |
select merged cells
It should work perfectly. What error does VB give....?
If the error is: OBJECT REQUIRED, then the sheet name is not correct otherwise it should work perfectly - Manges -- Message posted from http://www.ExcelForum.com |
select merged cells
any of these should work. You can't select a range w/o going to the sheet
but you can use goto Sub selectmerged() 'Sheet5.Select 'Range("f3").Select 'Application.Goto Sheets("Sheet5").Range("f3") Application.Goto Sheet5.Range("f3") End Sub -- Don Guillett SalesAid Software "Max Potters" wrote in message ... Hi , I'm trying to select merged cells ("B25:B28"). When I type in the following code, sheet1.range("B25").select, VB gives an error. I tried selecting the whole range as well, but no success. Hope someone knows how to do this. Thanks in advance Max |
select merged cells
the sheet with code name sheet1 would also need to be the active sheet.
sheet1.Activate Sheet1.Range("B25").MergeArea.Select mergearea shouldn't be required, but makes your intent clearer. -- Regards, Tom Ogilvy "mangesh_yadav " wrote in message ... It should work perfectly. What error does VB give....? If the error is: OBJECT REQUIRED, then the sheet name is not correct. otherwise it should work perfectly - Mangesh --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 10:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com