Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy paste non merged to merged cells | Excel Worksheet Functions | |||
How can I sort an Excel Doc containing merged & non-merged cells? | Excel Discussion (Misc queries) | |||
Autofit Merged cell Code is changing the format of my merged cells | Excel Discussion (Misc queries) | |||
how do i link merged cells to a merged cell in another worksheet. | Excel Worksheet Functions | |||
Sorting merged cellsHow do I sort merged cells not identically siz | Excel Worksheet Functions |