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: 16
Default Simplify Code - Select Case

Hi

Could someone help me simplify the below code. Basically the module is used
to import some data and format it ready for output. I have the below checks
to do before any calculations will run, I am adding more reconciliations to
this list so would like to keep it as simple and as short as possible. Could
I use a select case statement for this?

If Worksheets("ZPOHeader").Range("A1").Value < "" Then
Call ZPOHeader
Else
MsgBox ("Import the ZPOHeader report and then rerun procedure")
End
End If

If Worksheets("ZPOHeader").Range("A1").Value < "" Then
Call ZPODetails
Else
MsgBox ("Import the ZPODetails report and then rerun procedure")
End
End If

If Worksheets("ABC_Month").Range("A1").Value = "" Then
MsgBox ("Import the ABC_Month report and then rerun procedure")
End
End If

If Worksheets("ABC_Accum").Range("A1").Value = "" Then
MsgBox ("Import the ABC_Accum report and then rerun procedure")
End
End If

 
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
Can I simplify a VB code?????? hoyos Excel Discussion (Misc queries) 1 November 6th 09 09:06 PM
Simplify code Inkel Excel Worksheet Functions 3 March 27th 09 05:52 PM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Need to simplify code alexwren Excel Discussion (Misc queries) 7 August 15th 06 08:07 PM
Help to simplify code. Michael Beckinsale Excel Programming 0 September 2nd 03 10:26 AM


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