Hi Dale,
Quote:
|
1) I want to lock all rows but the rows that contain forecast hours, forecast travel expense, and forecast other. In those rows I want to trigger an event that when they tab out of the cell I look at sheet 2 on that sheet I need to find a cell that matches column A and B , get that value , multiply by the value in the cell I tabbed out of and place the new value in the forecast Manpower cvell.
|
I think the best answer depends on how many rows of data there will typically be (1,000? 10,000? 10,000,000?) and which version of Excel are you automating?
Rather than VBA event handling, it may be better to have formulas in that column which will automatically calculate the new value. Do you think that could work for you?
Quote:
|
2) Part of me creating the spreadsheet is pasting some formatting and records. But I am getting a message when saving the wbook that says I have a large amount of data in the clipboard, do I want to save it. That message is stopping my code - how can i eliminate that message.
|
To do this, you can temporarily set the Excel application object's DisplayAlerts property to False. Say you use a variable called xlApp to hold a reference to the Excel instance you are automating, it would look like this:
Code:
Sub foo()
Dim xlApp As Excel.Application
'create Excel instance....
xlApp.DisplayAlerts = False
'do the Excel manipulations...
xlApp.DisplayAlerts = True
'etc....
End Sub