LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Get data from sheet to form and back to a different sheet

Hello,

I'm new to VBA. I'm using VBA within Excel 2007.

I am building a workbook to record customer contacts. The customers are
listed on a sheet, the user scrolls around on the sheet and calls the form
with <Shift<CTRL<C when they find a customer they want to contact.

The module for the macro starts out like this:

' Get the data from the spreadsheet to the form
ContactForm.Company = Cells(ActiveCell.Row, 2)
ContactForm.Contact = Cells(ActiveCell.Row, 4)
ContactForm.Address = Cells(ActiveCell.Row, 5)
ContactForm.City = Cells(ActiveCell.Row, 7)
....

ContactForm.Show


Then, when the user clicks on an "AddAttempt" command button on the form,
I'd like to record the form values in the 'next' row in a DIFFERENT sheet
(named 'Contacts')

I can get the data to the form, but am struggling with getting the form data
back to a different worksheet.

Any help with the syntax to do this would be appreciated! :)

--Dan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write data back from a form to sheet Steen Excel Discussion (Misc queries) 9 October 22nd 08 01:22 PM
Info from User Form to Data sheet and back Bafa Excel Programming 9 August 20th 06 11:26 AM
Can I switch back to Excel sheet while a form is shown? Ai_Jun_Zhang[_7_] Excel Programming 2 August 31st 05 01:57 AM
From form to sheet and back using proc count Excel Programming 0 February 13th 04 12:58 AM
How to set focus back to sheet after showing a user form Les[_4_] Excel Programming 0 July 21st 03 07:58 PM


All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"