microsoft-access-courses - assigning dimension
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » microsoft-access-courses - Assigning a dimension

microsoft-access-courses - Assigning a dimension

The UK's most regular instructor-led training courses.
Training information: microsoft-access-courses · Advanced.excel · VBA courses London

resolvedResolved · Low Priority · Version Standard

Assigning a dimension

Oliver has attended:
Excel VBA course

by - delegate Oliver [1 post] (2008 Jan 18 Fri, 10:29) replyReply

Hi,

I've recently changed PC's and it seems that I am now required to populate ".xls" when assigning an excel spreadsheet as dimension in code. For example, on my old computer, in code when i have two excel spreadsheets open and previously assigned "book1" as a dimension "D_Filename" and used the command;
Windows(D_Filename).Activate
the "book1" spreadsheet is activated.
Now I am required to assign "book1.xls" as the dimension, otherwise I receive "Run-time error `9`: Subscript out of range".

I am using the same version of Excel and VBA and cannot understand why the code doesn't work without ".xls" on my new computer - Are you able to assist?

Many thanks,
Oliver

Excel Advanced 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003/XP 2008 Aug 22 Fri Bloomsbury 1 book now £235 £240
2003/XP 2008 Aug 22 Fri Bayswater 2 book now £195 £205
2003/XP 2008 Aug 29 Fri Southwark 3 book now £224 £235
2003/XP 2008 Sep 3 Wed Bloomsbury 5 book now £219 £235
2003/XP 2008 Sep 5 Fri Bayswater 4 book now £195 £205
2003/XP 2008 Sep 10 Wed Tooting 0 FULL    
Full Schedule: See all 129 Excel Advanced course dates.
Bookings currently available until 24th November 2009.

RE: Assigning a dimension

by - trainer Rich platinum contributer[704 posts] (2008 Apr 4 Fri, 09:43) replyReply

Hi Oliver,

I'm not sure why that would be.

Perhaps it's to do with a Windows setting. Eg. I do know you can change your file view settings to 'hide file extensions for known file types', so perhaps it's that or some other Windows setting.

Is it not possibly to retype your code with the .xls part of the filename? Or are there many places you need to do this?

Another option is to assign a variable with value ".xls" and append this to all of your filenames. Then, if you are ever giving code to another colleague/computer and it requires the ".xls" part to NOT be there, you just unassign that one variable, effectively appending 'nothing' to all your filenames throughout all your code.

I hope this gives you some help. Sorry I can't offer any more explanation. Perhaps Microsoft can help?

Regards, Rich


Related articles

· An Introduction to Microsoft Excel: Top Features for the Excel Novice
· How Excel Training Can Improve Your Company's Sales Process
· Tools From Advanced Excel Courses: Goal Seek and Solver
· Excel Macros for the Non-Programmer
· Basic Excel Training

Excel tip:

Shortcut keys to move between sheets

Instead of clicking on a sheet tab to view a sheet, use the following keyboard shortcuts to move between sheets in the same file:

Ctrl + Page Down - Switch to the next worksheet (to the right)

Ctrl + Page Up - Switch to the previous worksheet (to the left)

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz