on 05-28-2015 4:23 AM
Hello,
I have a requirement to restrict Datasource to range of values for a field. It is working fine with single values, not for range. Please guide me with correct syntax.
1. Created 2 Excel Dropdown filled with values for 0CALWEEK i.e. "Calweek from" and "Calweek to"
2. if i select a value in "CalWeekTo" Dropdown, i want to restrict Datasource with Calweek Range
Code:
Dim WeekFr As String
Dim WeekTo As String
WeekFr = Sheets("Main").FromWeek.Value
WeekTo = Sheets("Main").ToWeek.Value
Dim lResult As Long
lResult = Application.Run("SAPSetFilter", "DS_1", "0CALWEEK", WeekFr - WeekTo, "INPUT_STRING")
Thanks,
Benarji.
Hi Benarji Ganapthi,
try this code,
WeekFr = Sheets("Main").FromWeek.Value
WeekTo = Sheets("Main").ToWeek.Value
'MsgBox WeekFr
'MsgBox WeekTo
Value = WeekFr & " - " & WeekTo
'MsgBox Value
Dim lResult As Long
lResult = Application.Run("SAPSetFilter", "DS_1", "0CALWEEK", Value, "INPUT_STRING")
Subhash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.