Variables... Complex ones!

  • Thread starter Thread starter Nick_Welbeck
  • Start date Start date
N

Nick_Welbeck

Guest
Hello. I have a problem. Hopefully you can help me!
I am only a very basic progammer so forgive any incompetance.

I need to define a variable in MSAccess,
Then need to pass it to Word,
Where it then needs to become a variable again.
I cannot use tables to store the variable and then DDE to get it out. There should be a way.

(This is off the top of my head so it may be a little wrong)
On CommandButton1 ()

Dim mytext as String

mytext = Text0.Value

' so i managed to define the variable. easy. but i havent got a clue how i would get it into Word. probably using the Global Statement, which i have tried, but cant get word to pick it up, there is no reason why this shouldnt work.
Any one that replies would be most appreciated, but i need to be able to do this in VBA cant use tables or word document! have fun with this one!

Thanks,
Nick
 
Me again, just realised how complicated i made that sound, even though it isn't particularly easy!

here is a clearer breakdown of what i need

1. define a varaiable from textbox (myvar = text0.text)
2. run word (Call Shell "C:\blah blah, "C:\mydocument,,) - or something like that - i got the code.
3. Make access make the varaible MYVAR available to word, so i can put it into a msgbox (for example) -> (msgbox "" & myvar & "")
(4) or tell word to retrieve the variable, instead of step 3.

help!!

nick.
 

Users who are viewing this thread

Back
Top Bottom