Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default VBA Code Examples

I'm new to VBA and attempting to write the code for a userform that will
input a new record into Excel via drop down lists. I'm looking to find a
simple example of userform code to learn off of but can't find any online -
any recommendations as to where I should be looking?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default VBA Code Examples

"Christine" skrev i melding
...
I'm new to VBA and attempting to write the code for a userform that will
input a new record into Excel via drop down lists. I'm looking to find a
simple example of userform code to learn off of but can't find any

online -
any recommendations as to where I should be looking?


For a start, it's usually as simple as finding the downmost row number and
write to the row below it like

Dim R as Long
'downmost A cell row number plus one:
R = Sheets(1).Cells(65000, 1).End(xlup).Row +1
'write:
Sheets(1).Cells(R, 1).Value = Val(Textbox1.Text)
Sheets(1).Cells(R, 2).Value = ListBox1.Text
Sheets(1).Cells(R, 3).Value = ComboBox3.Text
....

The rownumber R is the real key for all "records" operations, you may want
to extend the form to read and modify records after you get this working.

HTH. Best wishes Harald


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default VBA Code Examples

Here is a web site that is always a help to me.
http://www.contextures.com/xlUserForm02.html
--
Mike Q.


"Christine" wrote:

I'm new to VBA and attempting to write the code for a userform that will
input a new record into Excel via drop down lists. I'm looking to find a
simple example of userform code to learn off of but can't find any online -
any recommendations as to where I should be looking?

Reply
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
Useful Microsoft Visual Basic 6.0 guide, with code examples? G. Dagger[_2_] Excel Discussion (Misc queries) 5 January 9th 08 08:31 PM
Excel VBA examples [email protected] Excel Discussion (Misc queries) 1 July 3rd 07 01:47 PM
about examples hassan barjini New Users to Excel 1 November 2nd 05 11:08 AM
Looking for Userform examples - site on web, download examples thom hoyle Excel Programming 1 May 10th 05 05:23 PM
Examples of VBA code to scan all rows and perform a function conditionally? pjfarley3 Excel Programming 6 March 13th 05 06:09 AM


All times are GMT +1. The time now is 10:32 AM.

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"