|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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... |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
vb-excel link
Quote:
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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:
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
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:
|
|
#8
|
|||
|
|||
|
hi
hi career_dev!!
i hope u got what i mean to say ????please do reply thanking in anticipation ....... |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Linking Excell to VB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|