PDA

Click to See Complete Forum and Search --> : package and deployment question


wizkid
Feb 16th, 2006, 11:05 AM
hi,
i am creating a setup file using
package and deployment
in one of the step it is sayng like missing dependency file
what is the meaning of missing dependency file
is there any problem with that?
i am using just one excel file.i am attaching some printscreen for the pdw
thanks
wizkid

oh1mie
Feb 16th, 2006, 11:13 AM
You can check all *.dep files on system32 folger.

If you ask me, never use excel or office on references. Use only late binding.
Then you dont need keeping care of excel version. Also setup packet is smaller

oh1mie
Feb 16th, 2006, 11:15 AM
Sample of late binding

Dim xl As Object
Dim wb As Object
Dim ws As Object

Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Add()
Set ws = xl.ActiveWindow.ActiveSheet

wizkid
Feb 16th, 2006, 12:23 PM
i never use the this late bounding
it looks good.
ok i will try this one.
can u please tell me one example to put some value in a cell
thanks

Hack
Feb 16th, 2006, 12:25 PM
i never use the this late bounding
it looks good.
ok i will try this one.
can u please tell me one example to put some value in a cell
thanksHow you bind, late or early, is simple a matter of connecting.

Once connected, the same coding principles apply, so if you are doing it now, how you connect shouldn't affect the code you have running after you connect.

wizkid
Feb 16th, 2006, 12:30 PM
how can i find excel file dependency file

oh1mie
Feb 16th, 2006, 12:45 PM
how can i find excel file dependency file
On late binding, you dont need it

kleinma
Feb 16th, 2006, 01:33 PM
If you do go the late binding route, I suggest you write your code with early binding, and change it late binding before final compile.

You don't get the benefit of intellisense in the IDE as the IDE doesn't know what kind of objects you are working with when you use late binding

another thing that I dont see mentioned here is that late binding is good with office apps because if you wrote an app using office11 and the end user has office 10, then your app wont work right. Late binding wont have this problem (so long as your app doesn't use any feature in office 11 that wasn't around in office 10)

wizkid
Feb 16th, 2006, 01:44 PM
Set oWB = moApp.Workbooks.Open("C:\Book1.xls")
oWB.Sheets(1).Activate
dim cat as string

cat="catalogue"
oWB.Sheets(1).Cells(i, 1).Value =cat

what is the code to insert one value to cell.(in late binding)
previously i am using like in the above way.
any suggestions??

kleinma
Feb 16th, 2006, 02:07 PM
its all the same... the ONLY difference betwee early and late binding is the way you create the object and the way you have to set references. Please read this info

http://www.xtremevbtalk.com/t135815.html

for the examples they use excel, so you should find the objects familiar to you

wizkid
Feb 16th, 2006, 03:01 PM
Private Sub Command1_Click()

Dim xl As Object
Dim wb As Object
Dim ws As Object
Dim oDoc As Object

Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Add
Set ws = xl.ActiveWindow.ActiveSheet
ws = wb.Worksheets(1).Add(1, 1)
With wb
.SaveAs "C:\My Documents\MyPreso.xls"
.Close
End With

End Sub

ws = wb.Worksheets(1).Add(1, 1) ....here i am getting error like object property not set
what is the problem

kleinma
Feb 16th, 2006, 03:24 PM
with the line

ws = wb.Worksheets(1).Add(1, 1)

what is it you are trying to accomplish there? adding a new worksheet? or putting something on the first worksheet in the workbook?

wizkid
Feb 16th, 2006, 03:29 PM
i want to put some value in first cell in worksheet

kleinma
Feb 16th, 2006, 03:45 PM
try this

Private Sub Command1_Click()

Dim xl As Object
Dim wb As Object
Dim ws As Object
Dim oDoc As Object

Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Add
Set ws = wb.Worksheets(1)
ws.Range("A1").Value = "VBFORUMS"

With wb
.SaveAs "C:\test.xls"
.Close
End With

End Sub

wizkid
Feb 16th, 2006, 04:04 PM
Hi
really thanks for your help.it is working
today i learned what is the difference b/w latebinding and early binding
really i am new for this excel
thanks a lot
wizkid

kleinma
Feb 16th, 2006, 04:05 PM
glad I could help ;)

oh1mie
Feb 17th, 2006, 12:58 AM
You can also use Cells

ws.Cells(1, 1) = "Sample Text"
ws.Cells(1, 1).HorizontalAlignment = -4152 'xlRight

wizkid
Feb 17th, 2006, 03:26 AM
yes oh1mie,
i used this one also.
now it is working fine for me
thanks a lot
wizkid

kleinma
Feb 17th, 2006, 08:19 AM
wizkid, if you have this sorted out, you should mark the thread resolved from the thread tools above