Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-25-2012, 02:03 AM
JBeaucaire JBeaucaire is offline How to use named ranges in excel vba? Windows XP How to use named ranges in excel vba? Office 2003
Advanced Beginner
 
Join Date: Dec 2011
Posts: 51
JBeaucaire is on a distinguished road
Default

Based on what I see, even that isn't needed. You can look up column A of the Databas sheet and find the last row with data, add 1, then insert values across that row as per your form.

Code:
Option Explicit

Public Sub Save_Click()
Dim NextRow As Long

With Sheets("Databas")
    NextRow = .Range("A" & .Rows.Count).End(xlUp).Row + 1
    .Range("A" & NextRow).Value = Me.cboRisk.Value
    .Range("C" & NextRow).Value = Me.txtProblem.Value
    .Range("F" & NextRow).Value = Me.cboStatus.Value
End With

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use named ranges in excel vba? email as pdf attachment - subject line and attachment named after mail merge Nexus Mail Merge 12 04-13-2011 11:34 PM
How to use named ranges in excel vba? Named range drop-down jgelpi16 Excel 1 04-08-2011 03:08 PM
Dynamic Named Ranges using text hannu Excel 0 06-22-2010 04:42 PM
Can't import home adresses in outlook 2010 from excel named ranges eekie Outlook 0 05-14-2010 02:04 PM
How to use named ranges in excel vba? Opening multiple Excel files within the same Excel window. lost9471 Excel 2 05-01-2010 01:57 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft