Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Visual Basic

I know almost nothing about visual basic, and my supervisor asked me to add
some things into the code of a spreadsheet. I know what the code is supposed
to do, but I honestly don't know if I'm doing it right. Can someone tell me
what exactly this is doing??

Sub data()
Application.ScreenUpdating = False
For Each sht In ActiveWorkbook.Sheets
sht.Activate
ActiveSheet.unprotect
Next
Worksheets("Sheet").Visible = True
Worksheets("Data").Visible = True
Worksheets("Data").Activate
Columns("A:B").Hidden = False
region = Worksheets("Sheet").Range("Region").Value
Cells(3, 3).Select
cellcount = Range(Selection, Selection.End(xlDown)).Count
umis = 0
umiu = 0
umip = 0
mcpls = 0
mcplu = 0
mcplp = 0
gvfpls = 0
gvfplu = 0
gvfplp = 0
mshs = 0
mshu = 0
mshp = 0
bdchs = 0
bdchu = 0
bdchp = 0

These letter groups represent product lines that are being pulled from one
sheet and grouped together and placed in another sheet. I have to add another
group, but can I just add it into the code because how will excel know what
it is referencing too?
 
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
visual basic jiwolf Excel Worksheet Functions 2 October 8th 05 09:12 PM
Visual Basic and SP2 JessJ Excel Discussion (Misc queries) 2 October 6th 05 12:17 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Micos3 Excel Discussion (Misc queries) 9 June 28th 05 01:41 PM
Visual Basic Help Duncan Smith Excel Discussion (Misc queries) 1 December 3rd 04 09:13 AM


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