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: 87
Default Help Needed, May have bitten off more than I can chew

Hi Everyone

Need some help please:

Although I have a reasonably good understanding of VBA, I fail miersably
with Excel VB, and as such, I only have a small amount of VB knowledge, that
said, I need to create a VB Code to execute the follwing scenario via
CmdBtn.

Firstly:

Master & MastHist are located in the same folder, MastHist is purely an
Archival File for the year.

1. check if "MastHist - 2011.xls" is open, If not, then open it.

2. Remove color formatting from "Master"

3. Check Cell from "Master", "E2" for applicable Sheet to set focus to, eg
if "E2" = "Jan" then "MastHist - 2011" sheet focus will be "Jan"

4. Copy Cell from "Master", "D2" then set focus on "MastHist - 2011", "Jan"
or which-ever (Sheet/Month) has the focus and find the first available Cell
in Column A:A, Paste the Data.(Date)

5. Copy first Row available (from bottom Up) from "Master", between Column
A:Q, then paste it to "MastHist - 2011", "Jan" or which-ever (Sheet/Month)
has the focus and find the first available Cell in Column B:B, Paste the
Data. Loop this until all cells up to and including Row 5 (Excluding rows 1
to 4) of Master have been copied across to MastHist.

6. Set focus on "MastHist - 2011", "Jan" or which-ever (Sheet/Month) has the
focus, select range A1:Q4000 (Each sheet will not exceed 3000 rows but have
added extra 1000 just to be safe), then sort by "A" - Ascending.

7.Whilst focused on MastHist, Save.

Secondly:

In a seperate Sub()

8. Set focus on "Master" Check for underlying VB Code attached to Workbook
and Modules and delete all Code without the need to save Modules to another
location.

9. Delete Rows 1, 2 & 3.

10. SaveAs T:\MyFolder\Filename - "dd-mmm-yy".xls

I really appreciate any assistance you can afford me.

TIA
Clueless


 
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
Deleting Rows With Non-Needed Data between Needed Data Daren Excel Worksheet Functions 2 September 30th 08 06:47 PM
Needed Help.. Chaos2blue Excel Worksheet Functions 5 September 1st 06 09:06 AM
Help needed Gary Excel Worksheet Functions 5 July 19th 06 02:36 AM
help needed [email protected] Excel Discussion (Misc queries) 0 March 20th 06 07:01 PM
help needed todd22 Excel Discussion (Misc queries) 3 March 5th 06 07:46 PM


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