Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code it in macro?

Does anyone have any suggestions on how to code it in macro?
If cell A1 = B1 under ABC sheet on DEF.xls file, then process following
code, then nothing.
Does anyone have any suggestions on how to code and retrieve value from this
specific cells?
Thanks in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to code it in macro?


Set Databk = workbooks.open(filename:="c:\temp\DEF.xls")
Set Datasht = Databk.sheets("ABC")

with Datasht
if .Range("A1") = .Range("B1") then
'add your code here
end if

end With

Databk.close savechanges:=false


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=189250

http://www.thecodecage.com/forumz/chat.php

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to code it in macro?

Will it be possible to retrieve the value without opening the worksheet?
Thank you very much for any suggestions
Eric

"joel" wrote:


Set Databk = workbooks.open(filename:="c:\temp\DEF.xls")
Set Datasht = Databk.sheets("ABC")

with Datasht
if .Range("A1") = .Range("B1") then
'add your code here
end if

end With

Databk.close savechanges:=false


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=189250

http://www.thecodecage.com/forumz/chat.php

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to code it in macro?


there are only two way s of getting data out of a workbook without
opening the workbook.

1) Add a formula to a worksheet. You can do this with a macro.
2) Red/Write data to the workbook like a database using the ADO
method. This uses the Access Database library functions. This
technicaly doesn't open the file but make a connection to the file. You
can have multiple people working on the same workbook simulataneously.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=189250

http://www.thecodecage.com/forumz/chat.php

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to dll and vba code trouble shoot. mario Excel Programming 0 May 15th 08 07:07 PM
Slow code when used as VBA code instead of macro (copying visible columns) [email protected] Excel Programming 3 April 2nd 07 05:26 PM
Can I use code/macro to change code/macro in an existing file? Scott Bedows Excel Programming 2 February 14th 07 05:50 AM
read macro code by vb code Francesco Geri Excel Programming 2 October 7th 05 10:24 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"