LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Variables in Variables

Don't use this awkward construction:

"" &

Define your variables as strings or use CStr() so they don't need to be
implicitly coerced.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Carlos" wrote in message
...
hi Both,

Thanks for the help,

I manged to get round it in the end by creating another variable which
referance the sheet i was looking for

monthtotal = "" & monthopen & ".xls"


Worksheets("Master").Select
Sheets("Master").Copy After:=Workbooks(monthtotal).Sheets(1)

I'm still learning, in fact this time last week I hadn't even looked a VBA
coding so it's be a fast learning curve. I've read a little about the
"DIM"
function but don't really understand that side of it yet, so it's possibly
that this would have worked but I'm yet to cover that ground. can you
recomend any books or websites which help with explaining everything? I
use
the F1 key for definitions but sometimes these are just as complicated to
understand.

Thanks for your help on this!!

Carl



 
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
Sum if 2 variables ksel Excel Discussion (Misc queries) 6 June 18th 09 09:45 AM
Not at all clear on use of variables and/or object variables JMay-Rke Excel Discussion (Misc queries) 11 July 4th 08 06:36 PM
Storing variables in a macro and using those variables to performcalculations. [email protected] Excel Programming 3 December 10th 07 04:13 PM
Variables... Help! Graeme Excel Programming 4 July 21st 06 03:47 PM
Variables Chip Pearson Excel Programming 0 July 9th 04 04:22 PM


All times are GMT +1. The time now is 03:01 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"