ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Urgent solutions needed to resolve vba coding (https://www.excelbanter.com/excel-programming/344841-urgent-solutions-needed-resolve-vba-coding.html)

sunflowergal

Urgent solutions needed to resolve vba coding
 

Hi, I met with some vba coding problem with my project. Pls help me i
you can resolve it. Thank you!

1. I need to run userform in one workbook and the data must b
transfered to another workbook's sheet. How do I do it?
2. My file is 3MB and it runs really slow in automatic mode but I nee
the automatic mode to update all my data. So how can I reduce th
loading and calculating time?
3. How can I automatically close my userform after clicking on th
msgbox that pop up?
4. Is it possible not to activate the userform at the sheet that it i
going to input data

--
sunflowerga
-----------------------------------------------------------------------
sunflowergal's Profile: http://www.excelforum.com/member.php...fo&userid=2859
View this thread: http://www.excelforum.com/showthread.php?threadid=48261


JakeyC

Urgent solutions needed to resolve vba coding
 
1. It's possible, yes. You just have to specify the whole lot, e.g.

Workbooks("My Book").Sheets("The Sheet").Range(MyRange).Value =
MyForm.Textbox1.Text

or similar.

2. Not sure - can you be more specific about what/how is
loading/calculating

3. Just insert:

NameOfUserform.Hide

at the point you want it to vanish. You mention a msgbox, so I guess
the outcome of the msgbox will determine where you put this code.

4. Don't understand the question - if you mean can it appear whilst
using different sheets, then yes.


sunflowergal[_2_]

Urgent solutions needed to resolve vba coding
 

Thank you, JakeyC.

1. Every time i open my workbook, excel has to spend at least 5 minute
calculating all the cells before I can use the program. And most of th
time, the calculation cause the whole excel to hang. I have many I
functions imbeded in the worksheet to simulate auto calculation
recorded macros to auto the updating of information and a userform t
let the user key in data to check the availability of the timings (I
is a restaurant booking system.)

2. I have a button in Sheet 1 to activate the userform and the dat
collected from the userform will be transferred to Sheet 2. Every tim
I confirm the userform, the userform will bring me to the Sheet 2. Bu
I want the userform to remain in Sheet 1 as backdrop. Can I use an
codes to do do that

--
sunflowerga
-----------------------------------------------------------------------
sunflowergal's Profile: http://www.excelforum.com/member.php...fo&userid=2859
View this thread: http://www.excelforum.com/showthread.php?threadid=48261


JakeyC

Urgent solutions needed to resolve vba coding
 
1. If you have a macro that runs at startup, or causes delays during
use, place the statement,
Application.ScreenUpdating = False at the start, then
Application.ScreenUpdating = True at the end

This will speed things up a bit.

Recorded macros can be very inefficient, so maybe look and see if it's
doing anything unnecessary.

To end up at sheet1 after using sheet2 with the macro, just place:

Sheets("Sheet1").Activate

at the end of the procedure



All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com