Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() *Hey guys, I've studied C++ for a couple of years, but I am somewhat ne to Excel VBA -- so I was wondering if you could help me out. Here's th problem: Currently, I have a GetValue function which pulls a cell's value from closed workbook and an OutputData function which stores the value in th corresponding cell of the active sheet, however the cell's formatting i lost in the process. Is it possible to carry any of the cell' formatting across and, if so, could someone advise me on how to d this? In particular, what objects, classes, or functions might need? Also, would a GetFormat function call from GetValue slow th processing speed down much more than just passing more parameters t the GetValue function? Thanks. * Private Function GetValue(path, file, sheet, ref) Dim arg As String arg = "'" & path & "[" & file & "]" & sheet & "'!" Range(ref).Range("A1").address(, , xlR1C1) GetValue = ExecuteExcel4Macro(arg) End Function Private Function OutputData(File, InputRow, OutputRow, FileDone) p = PathName(File) f = FileName(File) s = "InputSheet" Do For c = 1 To 20 a = Cells(InputRow, c).address Activesheet.Cells(OutputRow, c) = GetValue(p, f, s, a) Next c InputRow = InputRow + 1 If Not FileDone Then OutputRow = OutputRow + 1 Exit Do Ignore = True FileDone = True Loop End Functio -- paulharve ----------------------------------------------------------------------- paulharvey's Profile: http://www.excelforum.com/member.php...fo&userid=2522 View this thread: http://www.excelforum.com/showthread.php?threadid=38714 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Export cell data to closed workbook | Excel Discussion (Misc queries) | |||
retrieving "unsaved" files that you accidentally closed? | Excel Discussion (Misc queries) | |||
Consolidation of data from cell in active sheet of closed workbook | Excel Worksheet Functions | |||
Get value of last cell in column A from a closed workbook | Excel Programming | |||
Linking to a cell in another (closed) workbook | Excel Programming |