J jmeuse2 Member Licensed User Longtime User Dec 16, 2012 #1 I'm going blind trying to make a variable contain a filename. I Dim 'filename' As String in Sub Process Globals but it keeps pausing on this line... Code: Copy Reader.Initialize(File.OpenInput(File.DirAssets,"filename" & ".txt")) I'm a card carrying newb groveling for every penny to make a dollars worth of programming.
I'm going blind trying to make a variable contain a filename. I Dim 'filename' As String in Sub Process Globals but it keeps pausing on this line... Code: Copy Reader.Initialize(File.OpenInput(File.DirAssets,"filename" & ".txt")) I'm a card carrying newb groveling for every penny to make a dollars worth of programming.
NJDude Expert Licensed User Longtime User Dec 16, 2012 #2 Try this: Code: Copy Dim FileName As String ... FileName = "MyFile" Reader.Initialize(File.OpenInput(File.DirAssets, FileName & ".txt")) I'm assuming you have a file named MyFile.txt in your assets. Upvote 0
Try this: Code: Copy Dim FileName As String ... FileName = "MyFile" Reader.Initialize(File.OpenInput(File.DirAssets, FileName & ".txt")) I'm assuming you have a file named MyFile.txt in your assets.
J jmeuse2 Member Licensed User Longtime User Dec 16, 2012 #3 "Thanks" "I" "discovered" "my" "mistake" "quoting" the "variable" Thanks NJDude! Upvote 0