I want to put specific cell top left of worksheet through moving scrolls.
So I searched, in some VBA document, found _Application::Goto() Method.
But I don't know how to use in C++ environment.
It's so hard to find documents about Excel Automation in "MFC C++" environment.
This is my code.
m_Range = m_Range.Find(COleVariant(_T(m_InputNameStr)), vOpt, xlValues,
vOpt, vOpt, xlNext, vOpt, vOpt, vOpt);
m_App.Goto(COleVariant(m_Range), gotoScrollTrue);
Actually, I have no idea with the first parameter.
Excel.h code says it should be "VARIANT& Reference"(void Goto(const VARIANT& Reference, const VARIANT& Scroll)), and MSDN says it can be "Range object" (
https://msdn.microsoft.com/library/office/ff839232(v=office.14).aspx)
but i don't know what should I use.
P.S
I think it doesn't matter whether it goes to top left or center of the worksheet.
I just want to put that cell somewhere people can easily find. Because that cell is gonna be a result of search.
If there's any good method instead of Goto() method, please let me know.
I know I'm clueless but any advice would be help.