ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help to get values from 3 option button in one cell (https://www.excelbanter.com/excel-programming/334598-help-get-values-3-option-button-one-cell.html)

Valeriy

Help to get values from 3 option button in one cell
 

I am transferring the data from one xls file to another. Both have the
same structure and inactive in the moment of data echange. I don't know

how to get data from the cell with three option button in it.
Please, help!


--
Valeriy
------------------------------------------------------------------------
Valeriy's Profile: http://www.excelforum.com/member.php...o&userid=25245
View this thread: http://www.excelforum.com/showthread...hreadid=387372


Norie

Help to get values from 3 option button in one cell
 

Can you give some more information

--
Nori
-----------------------------------------------------------------------
Norie's Profile: http://www.excelforum.com/member.php...fo&userid=1936
View this thread: http://www.excelforum.com/showthread.php?threadid=38737


Valeriy[_2_]

Help to get values from 3 option button in one cell
 

One cell on the sheet from wich I am going to read information has 3
grouped
option buttons. To reach it I sequencially do
1) opening the file and puting it to variable
2) looping trough the file worksheets
3) asigning every file sheet and current worksheet to the local
variables
4) looping trough the rows on every file worksheet
5) asigning values from specific file worksheet cell to the currrent
sheet cell

File sheet and current sheet are structurally identical. I can read
value from all
file sheet cells exept those which have three grouped option button on
them (in
code fragment below this is cell E8). I opened it using cell
collection, Range
object but result is negative in both cases. I cannot see controls in
this cell

Set Wbk = Workbooks.Open(Filename:=TextBox1.Text)
For i = 1 To Wbk.Worksheets.Count
If i = 1 Then
Set S1 = ThisWorkbook.Sheets(1)
Set Wst = Wbk.Worksheets(1)
For j = 1 To S1.Rows.Count
Select Case j
Case 5
S1.Cells("5", "B").Value =
Wst.Cells("5", "B").Value

Case 7
S1.Cells("7", "B").Value =
Wst.Cells("7", "B").Value
Case 8
S1.Cells("8", "B").Value =
Wst.Cells("8", "B").Value
S1.Cells("8", "E") =
Wst.Cells("8", "E")
Set R1 =
ThisWorkbook.Worksheets(1).Range("E8")
Set R2 =
Wbk.Sheets(1).Range("E8")
End Select
Next j
...........
Do You know why?


--
Valeriy
------------------------------------------------------------------------
Valeriy's Profile: http://www.excelforum.com/member.php...o&userid=25245
View this thread: http://www.excelforum.com/showthread...hreadid=387372



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

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