![]() |
Excel Named Ranges In VB.net
I have a need to determine the start row and column of an excel named range
using vb.net. I have successfully loaded a named range into a datagridform and now I need to save it to the same named range I extraced it from. |
Excel Named Ranges In VB.net
I build the subroutines/functions on the excel side and just pass in the
data, that way i (or others) can easily manipulate the named ranges without ..NET coding experience. Just call the function or routine xlApp.Run("SLEOutReport") you can pass data like xlApp.Run("SLEOutReport",data) -- -John Please rate when your question is answered to help us and others know what is helpful. "Wayne N" wrote: I have a need to determine the start row and column of an excel named range using vb.net. I have successfully loaded a named range into a datagridform and now I need to save it to the same named range I extraced it from. |
Excel Named Ranges In VB.net
I found this site as well, similar question, code posted at the bottom
http://www.xtremevbtalk.com/showthread.php?t=68291 -- -John Please rate when your question is answered to help us and others know what is helpful. "Wayne N" wrote: I have a need to determine the start row and column of an excel named range using vb.net. I have successfully loaded a named range into a datagridform and now I need to save it to the same named range I extraced it from. |
Excel Named Ranges In VB.net
Sorry, I think I asked the question wrong. I am using a datgridview control
and load that with a named range in an excel worksheet. When I try to write it back to the worksheet I do not know how to start the data transfer using the first cell in the named range. When I just save the datagridview data it starts in Cell A1. I can hard code the for loop to offset the destination data to match the particular worksheet ok but I need to use this code generically so need to be able to retrieve the start cell of a named range and use that as offset in the for loop I have for writing the datagrid view data to the sheet. Thanks for your help "John Bundy" wrote: I found this site as well, similar question, code posted at the bottom http://www.xtremevbtalk.com/showthread.php?t=68291 -- -John Please rate when your question is answered to help us and others know what is helpful. "Wayne N" wrote: I have a need to determine the start row and column of an excel named range using vb.net. I have successfully loaded a named range into a datagridform and now I need to save it to the same named range I extraced it from. |
Excel Named Ranges In VB.net
Wayne,
How about: range("myRange").Cells(1) or range("myRange").Cells(1).address? hth, Doug "Wayne N" wrote in message ... Sorry, I think I asked the question wrong. I am using a datgridview control and load that with a named range in an excel worksheet. When I try to write it back to the worksheet I do not know how to start the data transfer using the first cell in the named range. When I just save the datagridview data it starts in Cell A1. I can hard code the for loop to offset the destination data to match the particular worksheet ok but I need to use this code generically so need to be able to retrieve the start cell of a named range and use that as offset in the for loop I have for writing the datagrid view data to the sheet. Thanks for your help "John Bundy" wrote: I found this site as well, similar question, code posted at the bottom http://www.xtremevbtalk.com/showthread.php?t=68291 -- -John Please rate when your question is answered to help us and others know what is helpful. "Wayne N" wrote: I have a need to determine the start row and column of an excel named range using vb.net. I have successfully loaded a named range into a datagridform and now I need to save it to the same named range I extraced it from. |
All times are GMT +1. The time now is 12:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com