Link to home
Start Free TrialLog in
Avatar of Dinesh Kumar
Dinesh KumarFlag for India

asked on

VBA Submit button

Hello Experts,

Can I press submit button in sheet 1 and the VBA code will execute and data will get displayed in sheet 2

what should I do to have such a button?

Thanks
meetDinesh
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Please upload a sample workbook and show what data from sheet1 you would like to transfer to sheet2 by clicking the submit button.
Avatar of Dinesh Kumar

ASKER

there is a webservice call which gets the data, the call happens when I click on the submit button so that submit button is there is sheet1 and once I get the data from webservice I want to show the data in sheet2 instead of sheet1 so question here is that how can I do this in code, the data let us say can be employee information containing 10 columns. Please let me know if you need more inputs.
Can you provide a sample workbook as Neeraj requested?
Please find the sample where I want to show the results of 4th step in sheet2.

that 4th step I want to write in sheet1's VBA code
Book1.xlsx
Sub Submit_Click()
'1. Write ID in the sheet1
'2. Click on the Submit button in Sheet1
'3. Get the data from the Webservice based on the Ids
'4. the data is rendered in the Sheet2 as the format shown in the sheet 2
End Sub

The 4th Step I want to achieve.
please note that whenever we have a button in sheet1 then I think that button coding in VBA can have access to only sheet1 cells so I want to access sheet2 cells to render the data from sheet1 vba code.

its just like accessing sheet2 cells from sheet1 code.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
seems it will work, will check.. thank you