LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Still filename problem

I am sorry to repost this but it looks like too much time is passed and the
solution never came. I have two statements that involve a string called
"strMGR_SHORT_NAME that are having problems. In the first case, the
statement is

fname = StrMGR_SHORT_NAME & Sheets("INPUTS").Range("B45").Value &
Sheets("INPUTS").Range("E11").Value & ".xls"

The compiler error message I am getting says "object variable or with block
variable not set." I am pretty sure this statement had been working but
somehow now is not. I have had it show me that variable, which is entered
thru an Input Box and it is what it's supposed to be. But the command is
not working. Does this error message tell anyone anything?

Then, this subroutine calls another subroutine where I use a similar
statement to try to open a file. In this case, the statement that is
crashing is:

myFilename = StrMGR_SHORT_NAME & Sheets("Inputs").Range("E11").Value &
"SUMPRF" & ".L00"

It was not an XLS file and that caused some confusion but it now seems
evident that the real problem is that this same strMGR_SHORT_NAME is now
blank and so is not automatically being "seen' by the called subroutine.
So, the solution for this seems to be merely to pass the result of the
INPUTBox along and so the question is, shouldn't a calling subroutine pass
its definitions along to a subroutine it calls? And, if not, how do I get
it to do so?

Thanks,
Grace


 
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
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
Filename problem Grace[_4_] Excel Programming 15 June 13th 04 11:19 PM
Saving filename same as import filename Matt Excel Programming 4 February 24th 04 03:01 PM
Quote in filename causes problem with Application.Run Carolyn[_2_] Excel Programming 2 February 23rd 04 12:29 AM


All times are GMT +1. The time now is 10:30 PM.

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

About Us

"It's about Microsoft Excel"