Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

I may be in the wrong place, excuse

Status
Not open for further replies.

jeannier1975

Computer
Joined
Aug 14, 2019
Messages
3
Location
US
I may be in the wrong place, excuse me if I am. I am creating a wonderware application and I need to create some reports. the reports are Emission tags. I enter the start date and end date on excel form and by using historian wonderware formula (= Sheet1!$A$1:$A$10,"Row7",AFStartBinding,AFEndBinding,254,0,0,0,0,3,0,"",3,"",-1,0,"","NoFilter",20480))
I want the user to click on a button and it inputs the emission tags into the next excel row.I have tried something like this (Sub Test1()
Dim strFunc As String
Dim lngLastRow As Long


strFunc = "= Sheet1!$A$17:$A$21,""Row7"",AFStartBinding,AFEndBinding,254,0,0,0,0,3,0,"",3,"""",-1,0,"""",""NoFilter"",20480)"
strFunc = "='strFunc = "SUM(B9:B10)"


Range("A21").Value = "ExtractDate"
Range("A22").Formula = strFunc

lngLastRow = Cells(Rows.Count, 1).End(xlUp).Row
Range("A" & lngLastRow + 1).Value = lngLastRow
Worksheets(1).Calculate

End Sub


Function As Date, dtEnd As Date)
= DateDiff("d", dtStart, dtEnd)
End Function
)
But when i run the data it enters just the date field and no emission tag values and deletes the formula in all the cells.Any guidance on the issue would be grateful
 
Hi,

You never responded to my response in Tek-Tips.

I notice that you also failed to correct one of your function arguments.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
i never saw it i do apologize if you can help just help me.
 
Then please respond to your original thread in Tek-Tips.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top