File size: 5,746 Bytes
a87bb89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Excel Code Wizard</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: {
                            500: '#3B82F6',
                        },
                        secondary: {
                            500: '#10B981',
                        }
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 min-h-screen">
    <div class="container mx-auto px-4 py-12">
        <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-md overflow-hidden">
            <div class="p-8">
                <div class="flex items-center justify-between mb-8">
                    <h1 class="text-3xl font-bold text-primary-500">
                        <i data-feather="code" class="inline mr-2"></i>
                        Excel Code Wizard
                    </h1>
                    <div class="flex space-x-2">
                        <button class="px-4 py-2 bg-primary-500 text-white rounded-lg hover:bg-primary-600 transition">
                            <i data-feather="download" class="mr-2"></i> Export
                        </button>
                        <button class="px-4 py-2 bg-secondary-500 text-white rounded-lg hover:bg-secondary-600 transition">
                            <i data-feather="share-2" class="mr-2"></i> Share
                        </button>
                    </div>
                </div>

                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div>
                        <h2 class="text-xl font-semibold mb-4 text-gray-700">
                            <i data-feather="edit-3" class="inline mr-2"></i>
                            Code Instructions
                        </h2>
                        <div class="bg-gray-100 p-6 rounded-lg">
                            <ol class="list-decimal pl-5 space-y-4 text-gray-700">
                                <li>Open Excel and press <kbd class="bg-gray-200 px-2 py-1 rounded">ALT + F11</kbd> to open VBA Editor</li>
                                <li>Right-click on your workbook name in the Project window</li>
                                <li>Select <span class="font-medium">Insert</span> → <span class="font-medium">Module</span></li>
                                <li>Paste your code in the module window</li>
                                <li>Press <kbd class="bg-gray-200 px-2 py-1 rounded">F5</kbd> to run the code</li>
                                <li>Save your workbook as <span class="font-medium">.xlsm</span> to preserve macros</li>
                            </ol>
                        </div>
                    </div>

                    <div>
                        <h2 class="text-xl font-semibold mb-4 text-gray-700">
                            <i data-feather="clipboard" class="inline mr-2"></i>
                            Example Code
                        </h2>
                        <div class="bg-gray-800 p-4 rounded-lg">
                            <pre class="text-gray-200 text-sm overflow-x-auto">
<code>Sub HelloWorld()
    ' Simple macro example
    Dim ws As Worksheet
    Set ws = ActiveSheet
    
    ws.Range("A1").Value = "Hello World!"
    ws.Range("A1").Font.Bold = True
    ws.Range("A1").Font.Color = RGB(255, 0, 0)
    
    MsgBox "Macro executed successfully!", vbInformation
End Sub</code>
                            </pre>
                        </div>
                    </div>
                </div>

                <div class="mt-8">
                    <h2 class="text-xl font-semibold mb-4 text-gray-700">
                        <i data-feather="zap" class="inline mr-2"></i>
                        Quick Actions
                    </h2>
                    <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
                        <a href="#" class="p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition text-center">
                            <i data-feather="file-plus" class="mx-auto text-primary-500"></i>
                            <p class="mt-2 font-medium">New Macro</p>
                        </a>
                        <a href="#" class="p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition text-center">
                            <i data-feather="save" class="mx-auto text-primary-500"></i>
                            <p class="mt-2 font-medium">Save Code</p>
                        </a>
                        <a href="#" class="p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition text-center">
                            <i data-feather="search" class="mx-auto text-primary-500"></i>
                            <p class="mt-2 font-medium">Find Errors</p>
                        </a>
                        <a href="#" class="p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition text-center">
                            <i data-feather="help-circle" class="mx-auto text-primary-500"></i>
                            <p class="mt-2 font-medium">Get Help</p>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        feather.replace();
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>