Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Return to excel from vbe

I wrote a procedure that inserts two procedures into the activeworkbook
ThisWorbook module. I am trying to make a utility for novice users and
would like them not to see the vbe (it scares them). After the code is
written the vbe stays open on the ThisWorkbook module. What is the code
equivalent of alt + F11?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Return to excel from vbe

You can use this bobbo

Application.VBE.MainWindow.Visible = False



--
Regards Ron de Bruin
http://www.rondebruin.nl



"bobbo" wrote in message oups.com...
I wrote a procedure that inserts two procedures into the activeworkbook
ThisWorbook module. I am trying to make a utility for novice users and
would like them not to see the vbe (it scares them). After the code is
written the vbe stays open on the ThisWorkbook module. What is the code
equivalent of alt + F11?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Return to excel from vbe


Thanks that works. Is there a way to keep the screen from hopping back
and forth from excel to vbe while the code is executing or will I just
have to live with that?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Return to excel from vbe

Maybe this will help

http://www.cpearson.com/excel/vbe.htm#ScreenFlicker

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"bobbo" wrote in message
ups.com...

Thanks that works. Is there a way to keep the screen from hopping back
and forth from excel to vbe while the code is executing or will I just
have to live with that?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Return to excel from vbe

When you create the code you not have to display the VBE
you can run code like this without opening the VBE

See also Chip's site
http://www.cpearson.com/excel/vbe.htm

Sub AddProcedure()
Dim VBCodeMod As CodeModule
Dim LineNum As Long

Set VBCodeMod = ThisWorkbook.VBProject.VBComponents("Sheet1").Code Module
With VBCodeMod
LineNum = .CountOfLines + 1
.InsertLines LineNum, _
"Sub MyNewProcedure()" & Chr(13) & _
" Msgbox ""Here is the new procedure"" " & Chr(13) & _
"End Sub"
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"bobbo" wrote in message ups.com...

Thanks that works. Is there a way to keep the screen from hopping back
and forth from excel to vbe while the code is executing or will I just
have to live with that?



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
Return date if in range, else return blank LisaL Excel Worksheet Functions 1 July 22nd 09 03:23 PM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
LOOKUP and return the column heading for IF/THEN return for False NN Excel Discussion (Misc queries) 1 October 6th 06 11:24 AM
check if reference exists, then return its value or return 0 doudou Excel Worksheet Functions 1 June 4th 05 09:17 PM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"