Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default passing strings

I know you already have an answer, but it parallels something I do.

My understanding is you are passing a string from one workbook to
another and for some reason you need to use multiple files to do this.

(the result will print in the immediate window after running the second
subroutine.)

Sub save_variable()


st = "string to be passed"

Workbooks.Add
Range("a1") = st

Application.DisplayAlerts = False
'prevents asking if you want to write over old file

ActiveWorkbook.SaveAs ("stringtopass")

ActiveWorkbook.Close


End Sub


Sub get_variable()

Workbooks.Open FileName:="stringtopass"
st = Range("a1")
ActiveWorkbook.Close

Debug.Print "string passed: "; st

End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
How to find number of pairs of strings from list of strings? greg_overholt Excel Worksheet Functions 5 January 27th 06 10:42 PM
How can I count strings within strings Paul W Excel Worksheet Functions 4 June 14th 05 12:39 PM
passing strings pabs[_7_] Excel Programming 2 December 19th 03 06:25 PM
passing strings Sirron Excel Programming 2 August 27th 03 04:33 PM


All times are GMT +1. The time now is 11:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"