Results 1 to 2 of 2

Thread: cal VB function from MS Word (2nd & last try...)

  1. #1
    Guest
    I do it all the time with access & excel...
    but in word...
    My collegue told me he tried many times (he is better than me) and could never do it!!
    At least I'd like to know if somebody did it????


    I've got document1 (default) open;
    VB editor open
    I pasted my VB function :
    myfunction(yourstring) as String ...

    I've got a table 2 cols X 3 rows

    a1 b1
    a2 b2
    a3 b3

    how can i make b1 to be myfunction(a1)
    b2 to be myfunction(a1)
    etc...

    thank you for any help

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655

    Cool

    Well, if I'm reading this correctly, it would be.

    Code:
    Documents(1).Tables(1).Cell(1, 2).Range = myfunction(Documents(1).Tables(1).Cell(1,1).Range)
    Documents(1).Tables(1).Cell(2, 2).Range = myfunction(Documents(1).Tables(1).Cell(1,1).Range)
    Hope this helps.
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

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