Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 27th, 2006, 06:16 AM
sood_gemini sood_gemini is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 sood_gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 21 sec
Reputation Power: 0
Linking Excell to VB

hi all !!!
i have this problem that : Suppose there are 4-5 people working individually on their computers in EXCEL and the data is getting updated in real time in thier excel sheets ....i want a VB code to connect all these excel sheets to one computer and that too these excel sheets should come in real time only ...


please please help me for the same ASAP as this is real urgent for my projecttttttttttttttt...

Reply With Quote
  #2  
Old May 28th, 2006, 11:57 AM
career_dev career_dev is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 10 career_dev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 42 m 26 sec
Reputation Power: 0
is it ur problem?

hi
do u want to extract the excel data thru VB application?
if i am correct, i can write the code for u...
let me know the issue..\
career_dev

Reply With Quote
  #3  
Old May 29th, 2006, 03:49 AM
sood_gemini sood_gemini is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 sood_gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 21 sec
Reputation Power: 0
vb-excel link

Quote:
Originally Posted by career_dev
hi
do u want to extract the excel data thru VB application?
if i am correct, i can write the code for u...
let me know the issue..\
career_dev



hi carrer_dev
thanx for replying to my post .
yes my requiremnt is that atpresent there are 'n' number of people working on diffrernt systems .They have their data in excell sheets which gets updated in real time ..so my problem is to get all the excell sheets together at one place i.e. extract the data from excell sheets in real time ...CAN U PLESE HELP ME WITH IT ..or if u have some other way of doing it ....if this is possible then very good ..or atleast the way you are suggesting for extracting excel data through VB please do reply ..thanking in anticipation

Reply With Quote
  #4  
Old May 30th, 2006, 12:05 AM
career_dev career_dev is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 10 career_dev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 42 m 26 sec
Reputation Power: 0
Arrow Access an Excel spreadsheet from VB

Hi sood_gemini,
just cut & paste this i vb form:if it is not the solution for ur problem please let me know, i will try this once again

To Access an Excel spreadsheet from VB:

Set ep = CreateObject("excel.application")
Set wb = ep.workbooks.Add
Set ew = wb.sheets(1) 'This bit creates the object heirarchy that is needed in Excel
ep.application.Visible = True 'This launches Excel
Private Sub Command2_Click()
ep.Range("A4").Select
ep.ActiveCell.FormulaR1C1 = "1"
ep.Range("A6").Select
ep.ActiveCell.FormulaR1C1 = "2"
ep.Range("A8").Select
ep.ActiveCell.FormulaR1C1 = "3"
ep.Range("A9").Select
ep.ActiveCell.FormulaR1C1 = "4"
ep.Range("A8:A9").Select
ep.Selection.AutoFill Destination:=ep.Range("A8:A12"), Type:=xlFillDefault
ep.Range("A8:A12").Select
'This bit puts all the values in the cells. I recorded a macro in Excel, and just cut and paste it into VB (and added the ep object).
End Sub
hope this will help u...
if u want to print Excel sheet from VB:

StartDoc = ShellExecute(Scr_hDC, "Print", DocName,"", "C:\", 0)

Visual Improvements:
Sub NormalPosition () '
' Select top cell for all sheets
' Visual improvement for your documents
'

k = Worksheets.Count
For i = 1 To k
If Worksheets(k - i + 1).Visible Then
Worksheets(k - i + 1).Select
Cells(ActiveWindow.SplitRow + 1, ActiveWindow.SplitColumn + 1).Select
End If
Next i
End Sub

Thanks,
career_dev

Reply With Quote
  #5  
Old May 30th, 2006, 03:09 PM
sood_gemini sood_gemini is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 sood_gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 21 sec
Reputation Power: 0
vb-excel thanks

hi career_dev!!
thanks a lot for the code .Yes i am now able to open the excell sheet in VB.But what i want is the i should be able to open say 'n' number of excel sheets from 'n ' computers and that too in real time ......

it would be reallly grateful of you if you could help me out with that ....you are real genius in VB software it feels

thanks a lot again.,,,waiting for an early reply from you ...

Quote:
Originally Posted by career_dev
Hi sood_gemini,
just cut & paste this i vb form:if it is not the solution for ur problem please let me know, i will try this once again

To Access an Excel spreadsheet from VB:

Set ep = CreateObject("excel.application")
Set wb = ep.workbooks.Add
Set ew = wb.sheets(1) 'This bit creates the object heirarchy that is needed in Excel
ep.application.Visible = True 'This launches Excel
Private Sub Command2_Click()
ep.Range("A4").Select
ep.ActiveCell.FormulaR1C1 = "1"
ep.Range("A6").Select
ep.ActiveCell.FormulaR1C1 = "2"
ep.Range("A8").Select
ep.ActiveCell.FormulaR1C1 = "3"
ep.Range("A9").Select
ep.ActiveCell.FormulaR1C1 = "4"
ep.Range("A8:A9").Select
ep.Selection.AutoFill Destination:=ep.Range("A8:A12"), Type:=xlFillDefault
ep.Range("A8:A12").Select
'This bit puts all the values in the cells. I recorded a macro in Excel, and just cut and paste it into VB (and added the ep object).
End Sub
hope this will help u...
if u want to print Excel sheet from VB:

StartDoc = ShellExecute(Scr_hDC, "Print", DocName,"", "C:\", 0)

Visual Improvements:
Sub NormalPosition () '
' Select top cell for all sheets
' Visual improvement for your documents
'

k = Worksheets.Count
For i = 1 To k
If Worksheets(k - i + 1).Visible Then
Worksheets(k - i + 1).Select
Cells(ActiveWindow.SplitRow + 1, ActiveWindow.SplitColumn + 1).Select
End If
Next i
End Sub

Thanks,
career_dev

Reply With Quote
  #6  
Old May 30th, 2006, 04:31 PM
career_dev career_dev is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 10 career_dev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 42 m 26 sec
Reputation Power: 0
Arrow excel data thru VB application

Hi sood_gemini,
please let me know where u r getting the problem? did u already wrote any code for this? actually we have to link all these documents (from multiple computers) to a macro sheet then we have to access that file thru VB form(xyz.frm).
if u already wrote any code please do send that to me i will debug that code..orelse i will write the code
thanks,
career_dev

Reply With Quote
  #7  
Old May 31st, 2006, 02:39 AM
sood_gemini sood_gemini is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 sood_gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 21 sec
Reputation Power: 0
link

hi career_dev
no i didnt write any code for connecting these excel sheets ...actually i am not that perfect in this vb thing.that is why requested for your kind help.

i just used the code on the VB form only ...Actually i dont know how to link all the documents from multiple sheets to a MACRO SHEET...CAN U TELL HOW TO LINK THESE DOCUMENTS TO A MACRO SHEET, and then i can try the code again.....Also try and see how we can get the data uin real time only.do we need to add any refresh function???

dont mind coz i am at a begiinner level but have given a tough project to do ....

hope u would understand me and reply ..
thanks




Quote:
Originally Posted by career_dev
Hi sood_gemini,
please let me know where u r getting the problem? did u already wrote any code for this? actually we have to link all these documents (from multiple computers) to a macro sheet then we have to access that file thru VB form(xyz.frm).
if u already wrote any code please do send that to me i will debug that code..orelse i will write the code
thanks,
career_dev

Reply With Quote
  #8  
Old June 2nd, 2006, 02:08 AM
sood_gemini sood_gemini is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 5 sood_gemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 21 sec
Reputation Power: 0
hi

hi career_dev!!

i hope u got what i mean to say ????please do reply
thanking in anticipation .......

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Linking Excell to VB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT