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: 150
Default call duplicated

New to VBA

I'm using the following code which is based on a range:

Sub update_finance()
'

If Range("b4").Value = "expenses1" Then Workbooks.Open
"C:\expenses1.xlsm"
Windows("dollars.xlsm").Activate
Sheets("Estimate").Select
Application.Run "'dollars.xlsm'!SAVE_expenses1"

If Range("b4").Value = "expenses2" Then Workbooks.Open "C:\expenses2.xlsm"
Windows("dollars.xlsm").Activate
Sheets("Estimate").Select
Application.Run "'dollars.xlsm'!SAVE_expenses2"
End Sub
--
"expenses1" runs OK but when I use "expenses2" in the cell it flips back to
the first one. I will have six range variables when I'm done but I didn't
see much sense in moving on until the first two are resolved.

Not sure how to remedy: if-then-else?


stan
 
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
Duplicated cell David Excel Discussion (Misc queries) 4 January 30th 07 09:35 AM
duplicated values baha Excel Discussion (Misc queries) 2 December 10th 06 11:11 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Duplicated rows cj21 Excel Discussion (Misc queries) 1 July 29th 05 01:55 PM
Duplicated Spreadsheet Alec Shaw Excel Worksheet Functions 2 March 8th 05 05:36 AM


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