Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Novice to VBA need some help

Status
Not open for further replies.

theguru97321

IS-IT--Management
Feb 3, 2003
216
US
I've been programming in PERL and HTML for a while, but I have a customer that needs a more mobile solution. I've tried Access, but I've given up. I've created a spreadsheet that will work, but I need a way to populate it quickly.

I'd like to use the Dialog sheet to create a form that will populate (update) cells through out the workbook.

Are there any examples out there for me to work with? I've been able to reverse engineer most of the work I've done in the past, so I think I can figure this out, just don't have a working product to use.



I have 31 sheets, with 30 rows of 2 column data on each. I'd like the Dialog Sheet to have one input field (text or integer) for each worksheet. then when data is entered into the fields, and OK or SUBMIT is pressed the form(macro) will go through each worksheet that has data in the field and update the proper column based on the data entered.

It's a voting booth pretty much. 31 classes of cars, upto 30 cars per class. when someone enters 1,2,3..30 in the proper class field it should update the column +1, to show 1 more vote to that car in that class.
 

Hi,

Take a look at Data/Form on the workbook toolbar.

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
I have, i've made a form. But I have no idea where to start with the VBA scripting.
 

If you have sheet with tabular formats, it takes no code -- just Data/Form.

Now you might want to code popping this up -- so turn on your macro recorder and do it.

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
I want to be able to adjust multiple Sheets with one form. From what I've seen in Data/Form it's per sheet.. or am I missing something?
 

Are you wanting to update multiple sheets from a single UserForm?

Then its a matter of assigning the control, probably textboxes, mostly to cell values like
Code:
Sheet1.[A1].Value = UserForm1.TextBox1.Text
If you use Named Ranges then it could be...
Code:
[MyNamedRange].Value = UserForm1.TextBox1.Text



Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 


Since you are needing the NEXT row
Code:
With Sheet1
  lNextRow1 = .[A1].CurrentRegion.Rows.Count + 1
  .Cells(lNextRow1, "A").Value = UserForm1.TextBox1.Text
  .Cells(lNextRow1, "B").Value = UserForm1.TextBox2.Text
End With


Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top