Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign a cell value (from another file) to a varieble
I have try too many things but it does not work.... need to pick up a value
from a cell and place it into a variable... I tried myVal.Value = [FM Deviation Request R1.0.xls].Form.R2C17 myVal = AOS Deviation Request R1.0.xls.Sheets("AOS Form").Range("Q2").Value" and many more but can not work. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign a cell value (from another file) to a varieble
Dim myVal as Variant
Dim wb as Workbook 'For referring Open workbook Set wb = Workbooks("workbookname.xls") 'To open a excel file and reference it 'Set wbBook = Workbooks.Open("<fullpath\<filename.ext") myVal = wb.Sheets("Sheet1").Range("Q2").Value Msgbox myVal If this post helps click Yes --------------- Jacob Skaria "Alberto Ast" wrote: I have try too many things but it does not work.... need to pick up a value from a cell and place it into a variable... I tried myVal.Value = [FM Deviation Request R1.0.xls].Form.R2C17 myVal = AOS Deviation Request R1.0.xls.Sheets("AOS Form").Range("Q2").Value" and many more but can not work. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign a cell value (from another file) to a varieble
myVal = workbooks("AOS Deviation Request R1.0.xls").WorkSheets("AOS
Form").Range("Q2").Value Tim "Alberto Ast" wrote in message ... I have try too many things but it does not work.... need to pick up a value from a cell and place it into a variable... I tried myVal.Value = [FM Deviation Request R1.0.xls].Form.R2C17 myVal = AOS Deviation Request R1.0.xls.Sheets("AOS Form").Range("Q2").Value" and many more but can not work. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
assign file numbers to names | Excel Discussion (Misc queries) | |||
Assign cell value to equal file path for loading | Excel Programming | |||
How can you assign a bmp. file to a formula or macro? | Excel Worksheet Functions | |||
VBA assign macro to button from a different file (simple you'd thi | Excel Programming | |||
Assign Cell Content As File Name | Excel Programming |