View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
gocush[_29_] gocush[_29_] is offline
external usenet poster
 
Posts: 252
Default badly struck! how to pass values from asp to excel

Is this a UserForm in Excel? as opposed to a Form in say Access Database?

If it's an Excel Userform and you want the data transferred to a cell in
Excel then:
in the userform code module of the Visual Basic Editor you will have some
code that ends the userform, something like
Private Sub cmdOK_Click()
'some code
' Then add this line, adjusting the range as desired:
'This will transfer the data to your cell in a worksheet
Sheets("Sheet3").Range("B8")=Me.Textbox1.Value
'or if the data is in a combobox, use Me.ComboBox4.Value

Me.Hide
End sub

"VbUser25" wrote:



hi
i am opening an excel file in the same explorer window as the form. i am
storing values entered in excel in database. while saving the field in
the db i need to save a field from the form also.

how can i get a form value inside the vba code or to put it like this
how can i refer the form value inside excel???

i m simply opening a template of excel file.

pls suggest

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!