LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Using VBA to change Excel layouts

Well, I was hoping to avoid file open operations. I kind of just
wanted the spreedsheet to transform itself "on the fly" or
immediately when a user makes a listbox selection or something.

So, my current code idea would look as follows:

Select Case spreedsheet_choice
Case 1:
Columns(1).ColumnWidth = 12
Columns(2).ColumnWidth = 12
Columns(3).ColumnWidth = 12
Cells(1, 1).Value = "Name"
Cells(1, 2).Value = "Age"
Cells(1, 3).Value = "Sex"
Cells(1, 1).Interior.ColorIndex = 3
Cells(1, 2).Interior.ColorIndex = 3
Cells(1, 3).Interior.ColorIndex = 3
' etc etc
Case 2:
Columns(1).ColumnWidth = 5
Columns(2).ColumnWidth = 5
Columns(3).ColumnWidth = 5
Cells(1, 1).Value = "Client Name"
Cells(1, 2).Value = "Age"
Cells(1, 3).Value = "M/F"
Cells(1, 1).Interior.ColorIndex = 4
Cells(1, 2).Interior.ColorIndex = 4
Cells(1, 3).Interior.ColorIndex = 4
' etc etc
Case 3:
' etc etc...
Case 4:
' etc etc
End Select


Would the code above be just as effective as your method of loading
a template file??? Is my method above too complicated??

What do you think??

Thank you!


"JLGWhiz" wrote in message
...
You could make four templates and simply give the user a choice of which
template to use. The template would have to be saved as a different file
name than the template, but if it is a true template file (.xlt), it will
require that the user do that. Then you could use a listbox or combobox
with the four choices and when the user selects, it runs a macro to open
the xelected template.



 
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
Shared Excel Workbooks Show different layouts between users MichaelC3027 Excel Discussion (Misc queries) 1 April 13th 10 03:18 PM
Help woth printing different layouts PowerPoint Jedi Excel Discussion (Misc queries) 2 April 11th 07 05:38 PM
Do you have to make seperate layouts for Mac and PC? dk_ Excel Discussion (Misc queries) 2 October 16th 06 02:39 AM
how to make form layouts carole New Users to Excel 1 June 11th 06 06:29 AM
I'm looking for an advertising layouts for a weight loss programs Health for you weightloss programs Excel Worksheet Functions 1 February 28th 06 11:15 PM


All times are GMT +1. The time now is 06:51 AM.

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"