Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default under

Here is my problem :

I have a GetValue function which returns the value of cell in function of
its abscissa and its ordinate
SetValue sets a value in a cell with the same procedure

-----------------------------------
Function GetValue(S_Fond As String, S_Valeur As String)

Dim Adresse
Adresse = Cells(Range("A:A").Find(S_Valeur).Row,
Range("1:1").Find(S_Fond).Column).Address(False, False)

GetValue = Range(Adresse).value
End Function
-----------------------------------
Function SetValue(S_Fond As String, S_Valeur As String, D_Value)

Dim Adresse As Range
Adresse = Cells(Range("A:A").Find(S_Valeur).Row,
Range("1:1").Find(S_Fond).Column).Address(False, False) *
Range(Adresse).value = D_Value
End Function
-----------------------------------
Then i try to test theses function with a macro

-----------------------------------
Sub GetNumberOfFund()

Dim ad
ad = GetValue("f1c1", "first")

Call SetValue("sec", "InsertData", ad)

End Sub
-----------------------------------

"f1c1" and "sec" are in the first row of my sheet; "first" et "InsertData"
are in the first column

When i execute the macro i get this error (on tje line with an * in SetValue)

I just don't understand where this comes from

Many thanks
 
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



All times are GMT +1. The time now is 03:26 PM.

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"