Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default newbie with userform questions

Win98SE Office 2000. (NEWBIE ALERT). What I would like to do is insert a
user form into a macro asking the user if the information they are adding is
correct before allowing the macro to run. I have the user form with Yes or
No, No ends the userform but I can't find a function to insert it.
Or as I received no help from another group (wrong one!) is to not allow the
macro to run (Via button) if the two drop down boxes and normal cell (for
amount) are left blank. Currently the cell link is set to 1 - blank.
Anyone have any ideas?

TIA Sara


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default newbie with userform questions

Sara,

I need some help here. When you talk about the information, where is that,
on the userform or on a worksheet? And where do the dropdown boxes come into
play, and what sort of dropdowns are they, data validation, worksheet forms,
control toolbox, or userforms?

Give us a bit more detail of what you are trying to do, and what you have
built so far, and I am sure we can help.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"sara" wrote in message
...
Win98SE Office 2000. (NEWBIE ALERT). What I would like to do is insert a
user form into a macro asking the user if the information they are adding

is
correct before allowing the macro to run. I have the user form with Yes

or
No, No ends the userform but I can't find a function to insert it.
Or as I received no help from another group (wrong one!) is to not allow

the
macro to run (Via button) if the two drop down boxes and normal cell (for
amount) are left blank. Currently the cell link is set to 1 - blank.
Anyone have any ideas?

TIA Sara




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default newbie with userform questions

Hello Bob
I have two drop down boxes in a workbook that the user selects product and
language (from another workbook called Dbase). The drop downs were drawn on
the worksheet using forms toolbar. Under the drop downs I have normal cells
that the macro copies into another sheet for the generation of a manifest,
the macro then clears the cells by turning the cell link back to 1 (blank).
The quantity box is just number format for the actual number of sachets
being dispatched, the macro has been copied from another author and adapted
to my needs as follows;

Sub ADD_PRODUCT()
'
' ADD PRODUCT TO CHECK WEIGH SHEET Macro
' Macro recorded 21/03/2004 by sara
' HIDE UPDATE FROM USER
Application.ScreenUpdating = False
Sheets("DATA").Select
Range("A1").Select
Selection.CurrentRegion.Select
' check for empty table
If Range("a2") < "" Then
Selection.End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("INPUT").Select
Range("SACHETS").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("DATA").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Range("a1").Select
Sheets("INPUT").Select
Range("CODE").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("DATA").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
ActiveCell.Offset(1, 0).Range("a1").Select
Sheets("input").Select
Range("b1").Select
Selection.ClearContents
Range("B1").Select
ActiveCell.FormulaR1C1 = "1"
Sheets("input").Select
Range("d12").Select
Selection.ClearContents
End Sub

So to recap, I would like a user form or pop-up to ask the user if they are
sure the information they want copied is correct and/or if any of the three
requirements are not met, the button (form control) associated with the
macro would be inactive. Does this make sense?

Sara


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default newbie with userform questions

Morning Sara,

I think this will address the message part of your needs, but I am still not
clear on the second part. You say that '... and/or if any of the three
requirements are not met, the button (form control) associated with the
macro would be inactive ...' . What 3 requirements, and where does this
button (form control) come into it? I am not clear as to what this is, or
how to make it inactive.

I have also tidied up your code a bit to make it easier to read

Sub ADD_PRODUCT()
Dim ans As Long
'
' ADD PRODUCT TO CHECK WEIGH SHEET Macro
' Macro recorded 21/03/2004 by sara
' HIDE UPDATE FROM USER
Application.ScreenUpdating = False
Sheets("DATA").Select
Range("A1").CurrentRegion.Select
' check for empty table
If Range("A2") < "" Then
Selection.End(xlDown).Select
End If
ans = MsgBox("Continue with Copy?", vbYesNo, "Check Weight Sheet")
If ans = vbYes Then
Sheets("INPUT").Range("SACHETS").Copy
Sheets("DATA").Select
ActiveSheet.Paste
Sheets("INPUT").Range("CODE").Copy
Sheets("DATA").PasteSpecial Paste:=xlValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
With Sheets("input").Range("B1")
.ClearContents
.Value = "1"
End With
Sheets("input").Range("D12").ClearContents
End If
Application.ScreenUpdating = True
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"sara" wrote in message
...
Hello Bob
I have two drop down boxes in a workbook that the user selects product and
language (from another workbook called Dbase). The drop downs were drawn

on
the worksheet using forms toolbar. Under the drop downs I have normal

cells
that the macro copies into another sheet for the generation of a manifest,
the macro then clears the cells by turning the cell link back to 1

(blank).
The quantity box is just number format for the actual number of sachets
being dispatched, the macro has been copied from another author and

adapted
to my needs as follows;

Sub ADD_PRODUCT()
'
' ADD PRODUCT TO CHECK WEIGH SHEET Macro
' Macro recorded 21/03/2004 by sara
' HIDE UPDATE FROM USER
Application.ScreenUpdating = False
Sheets("DATA").Select
Range("A1").Select
Selection.CurrentRegion.Select
' check for empty table
If Range("a2") < "" Then
Selection.End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("INPUT").Select
Range("SACHETS").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("DATA").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Range("a1").Select
Sheets("INPUT").Select
Range("CODE").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("DATA").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,

SkipBlanks:=
_
False, Transpose:=False
ActiveCell.Offset(1, 0).Range("a1").Select
Sheets("input").Select
Range("b1").Select
Selection.ClearContents
Range("B1").Select
ActiveCell.FormulaR1C1 = "1"
Sheets("input").Select
Range("d12").Select
Selection.ClearContents
End Sub

So to recap, I would like a user form or pop-up to ask the user if they

are
sure the information they want copied is correct and/or if any of the

three
requirements are not met, the button (form control) associated with the
macro would be inactive. Does this make sense?

Sara




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
Newbie Questions KS Excel Discussion (Misc queries) 3 June 18th 09 06:13 PM
Newbie Questions ? Robert11[_3_] New Users to Excel 2 February 5th 09 04:12 PM
Newbie Questions - X Axis and Data Range Eli Charts and Charting in Excel 2 June 17th 05 01:54 AM
Newbie questions on spreadsheet WayneC Excel Worksheet Functions 5 December 22nd 04 02:42 AM
newbie questions Eric Excel Worksheet Functions 1 December 14th 04 04:39 PM


All times are GMT +1. The time now is 08:49 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"