![]() |
How do I show a sheet programmatically?
I have bunch of cells from different sheets in a datagrid (that datagrid is
attached to Excel workbook thru some addin). If there are 2 cells (like $M$8 from Sheet1 and Sheet2 in that datagrid) - when I click Sheet1$M$8 - then it should hightlight sheet1 M8 cell and when I click Sheet2$M$8 - then it should highlight sheet2 M8 cell - but right now when I select Sheet1$M$8 and Sheet2$m$8 - it highlights same cell (M8 from sheet1) as my sheet1 is active sheet at this point. How do I dynamically change sheets? any help is really appreciated!! |
How do I show a sheet programmatically?
Sheet2.Activate
Mike F "Dev" wrote in message ... I have bunch of cells from different sheets in a datagrid (that datagrid is attached to Excel workbook thru some addin). If there are 2 cells (like $M$8 from Sheet1 and Sheet2 in that datagrid) - when I click Sheet1$M$8 - then it should hightlight sheet1 M8 cell and when I click Sheet2$M$8 - then it should highlight sheet2 M8 cell - but right now when I select Sheet1$M$8 and Sheet2$m$8 - it highlights same cell (M8 from sheet1) as my sheet1 is active sheet at this point. How do I dynamically change sheets? any help is really appreciated!! |
How do I show a sheet programmatically?
Thanks that worked..
"Mike Fogleman" wrote: Sheet2.Activate Mike F "Dev" wrote in message ... I have bunch of cells from different sheets in a datagrid (that datagrid is attached to Excel workbook thru some addin). If there are 2 cells (like $M$8 from Sheet1 and Sheet2 in that datagrid) - when I click Sheet1$M$8 - then it should hightlight sheet1 M8 cell and when I click Sheet2$M$8 - then it should highlight sheet2 M8 cell - but right now when I select Sheet1$M$8 and Sheet2$m$8 - it highlights same cell (M8 from sheet1) as my sheet1 is active sheet at this point. How do I dynamically change sheets? any help is really appreciated!! |
All times are GMT +1. The time now is 06:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com