Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro not starting

I've got a strange one here. On some of my macines this
macro works while others don't. I've checked to be sure
everyone's on the same rev....still no luck.

Any ideas? Here's the macro that is being used:

Public Function GetValueFromSheet(C As String, L As
Integer) As String
FName = ActiveSheet.Range("D1:E1").Cells(1, 1).Value
SName = ActiveSheet.Range("D1:E1").Cells(1, 2).Value
GetValueFromSheet = Workbooks(FName).Worksheets
(SName).Range(C & L).Value
End Function

And the cell formula looks like this:

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro not starting

Try this and let me know if it makes a difference:

Public Function GetValueFromSheet(C As String, L As
Integer) As String
FName = ActiveSheet.Cells(1, 4).Value
SName = ActiveSheet.Cells(1, 5).Value
GetValueFromSheet = Workbooks(FName).Worksheets.(SName).Range(C
L).Value
End Function

- Piku

--
Message posted from http://www.ExcelForum.com

Reply
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
starting macro again Davidm Excel Discussion (Misc queries) 3 June 3rd 09 04:12 AM
Starting macro Davidm Excel Discussion (Misc queries) 3 June 3rd 09 04:09 AM
Starting A Macro zephyr Excel Discussion (Misc queries) 2 November 10th 06 12:03 PM
starting a macro at startup chip_pyp Excel Discussion (Misc queries) 1 March 22nd 06 06:59 PM
Starting a macro with the IF function THW Excel Worksheet Functions 4 June 19th 05 05:40 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"