Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default UserForm Question

Now I understand that I need to create a UserForm in VB. I need help with
this. I'm going to repeat my question here because, well I don't know what
to do really


I'm reading up on this at http://www.contextures.com/xlUserForm01.html#SetUp
but I'm sure someone could explain, or I guess, do it for me.
I don't care if you don't do it for me, just tell me what I should be
looking for. Please?





This here lets one copy the worksheets and save individually as xls files.
GREAT!


Sub Make_New_Books()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
ActiveWorkbook.SaveAs FileName:=ThisWorkbook.Path & "\" &
w.Name
ActiveWorkbook.Close
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub




I needed to make my copied worksheets so they are saved as csv files. I
replaced the ActiveWorkbook.SaveAs line with the following



ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & w.Name,
FileFormat:=xlCSV, CreateBackup:=False

and it works GREAT!

I now have a request.


In my example I have 10 worksheets that I need saved as csv files. They are
currently named Sheet1 all the way to Sheet10

So with the above changes Sheet1 will save as Sheet.csv
GREAT!

But now we (company) need to start keeping track of things better. The boss
wants a numerical prefix added (8-10 digits long) and two suffixes (Code1
and Code2)
separated by a hyphen.



Each Code will have a list of choices, like this:
Code1
A
B
C
D
E

Code2
A
B
C
D
E

What we need is this:

When I select to save the file (before the files are copied) I need a window
to appear where we will enter the numerical prefix, then with a CONTINUE
button it would give me the option to select the Code1 choices with a Radio
Button, then Code2's choices.

I would like at the end a confirmation window with the option to CONTINUE
and CANCEL.

From my explanation I will give you the following example.
For our first trial of 10 worksheets, we want a numerical prefix of
987654321 Code1 suffix will be E Code2 will be B
Sheet1 and Sheet10, once saved would look like this:


987654321-Sheet1-E-B.csv and 987654321-Sheet1-E-B.csv, respectively.

Is this possible?

Thank You

Mr BT




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
Yet another userform combobox question teepee Excel Discussion (Misc queries) 4 May 17th 07 10:03 AM
Userform combobox question teepee Excel Discussion (Misc queries) 20 May 16th 07 09:42 AM
Another Userform question. ingleg Excel Discussion (Misc queries) 1 July 6th 06 01:17 PM
Userform question Greg B Excel Discussion (Misc queries) 1 May 13th 05 01:06 PM
Userform Question Greg B Excel Discussion (Misc queries) 3 March 10th 05 10:46 AM


All times are GMT +1. The time now is 06:37 PM.

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"