Results 1 to 19 of 19

Thread: package and deployment question

  1. #1

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    package and deployment question

    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
    Attached Images Attached Images  

  2. #2
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: package and deployment question

    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
    Last edited by oh1mie; Feb 17th, 2006 at 03:07 AM.
    oh1mie/Vic


  3. #3
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: package and deployment question

    Sample of late binding

    VB Code:
    1. Dim xl As Object
    2.     Dim wb As Object
    3.     Dim ws As Object
    4.  
    5.     Set xl = CreateObject("Excel.Application")
    6.     Set wb = xl.Workbooks.Add()
    7.     Set ws = xl.ActiveWindow.ActiveSheet
    Last edited by oh1mie; Feb 16th, 2006 at 03:48 PM.
    oh1mie/Vic


  4. #4

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    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

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: package and deployment question

    Quote Originally Posted by wizkid
    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
    How 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.

  6. #6

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    how can i find excel file dependency file

  7. #7
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: package and deployment question

    Quote Originally Posted by wizkid
    how can i find excel file dependency file
    On late binding, you dont need it
    Last edited by oh1mie; Feb 16th, 2006 at 03:47 PM.
    oh1mie/Vic


  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    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)

  9. #9

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    VB Code:
    1. Set oWB = moApp.Workbooks.Open("C:\Book1.xls")
    2.      oWB.Sheets(1).Activate
    3. dim cat as string
    4.  
    5. cat="catalogue"
    6.        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??

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    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

  11. #11

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    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

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    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?

  13. #13

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    i want to put some value in first cell in worksheet

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    try this
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. Dim xl As Object
    4. Dim wb As Object
    5. Dim ws As Object
    6. Dim oDoc As Object
    7.  
    8. Set xl = CreateObject("Excel.Application")
    9. Set wb = xl.Workbooks.Add
    10. Set ws = wb.Worksheets(1)
    11. ws.Range("A1").Value = "VBFORUMS"
    12.  
    13. With wb
    14. .SaveAs "C:\test.xls"
    15. .Close
    16. End With
    17.  
    18. End Sub

  15. #15

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    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

  16. #16
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    glad I could help

  17. #17
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043

    Re: package and deployment question

    You can also use Cells

    VB Code:
    1. ws.Cells(1, 1) = "Sample Text"
    2.     ws.Cells(1, 1).HorizontalAlignment = -4152 'xlRight
    oh1mie/Vic


  18. #18

    Thread Starter
    Hyperactive Member wizkid's Avatar
    Join Date
    Dec 2005
    Location
    uk
    Posts
    405

    Re: package and deployment question

    yes oh1mie,
    i used this one also.
    now it is working fine for me
    thanks a lot
    wizkid

  19. #19
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: package and deployment question

    wizkid, if you have this sorted out, you should mark the thread resolved from the thread tools above

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width